[ 
https://issues.apache.org/jira/browse/FLEX-34420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Kalinowski updated FLEX-34420:
-------------------------------------

    Attachment: QNameSet.patch

Patch that fixes the random compile issues for me.

> random compile error: Cannot resolve attribute 'implements'
> -----------------------------------------------------------
>
>                 Key: FLEX-34420
>                 URL: https://issues.apache.org/jira/browse/FLEX-34420
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: MXML Compiler
>    Affects Versions: Apache Flex 4.11.0, Apache Flex 4.12.1
>         Environment: Maven 3.0.5, flexmojos 7.0.0, windows and linux, jenkins 
> and without jenkins
>            Reporter: Julian Kalinowski
>         Attachments: QNameSet.patch
>
>
> Hi,
> I'm having the same problem as described in [1].
> When i compile our maven project, i get random errors like:
> Cannot resolve attribute 'implements' for component type 
> spark.components.BorderContainer.
> It happens only with the biggest module we have, so it seems to correspond to 
> project size.
> It's not always for the same source file and eventually, the build will 
> succeed.
> I'm using flexmojos-7.0.0 and flex-sdk 4.12.1, but this happened before with 
> earlier versions.
> To investigate this further, i compiled and debugged my own version of mxmlc 
> from the current apache flex sdk sources.
> i was able to track down the error to the following code:
> Line 54 in 
> flex-sdk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java
> "if (isSpecial(namespace, localPart))"
> When localPart is "implements", this condition should return true.
> And it does, most of the time. But sometimes, it doesn't.
> This all leads to a "contains" check on the QNameSet "specialAttributes2009" 
> in DocumentBuilder.java, which seems to occasionally return false even if an 
> attribute exists in the Set.
> Since this felt like a race condition, i replaced the optimized way QNameSet 
> handles the contains-check and marked the method as synchronized.
> The result is a mxmlc compiler, which doesn't have the error anymore.
> However, i'm not sure this is the correct fix, since no other thread should 
> modify the QNameSet...
> So please take a look into this error and decide how to fix it.
> [1] https://forums.adobe.com/message/5651765



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to