[jboss-jira] [JBoss JIRA] (JASSIST-198) java 6 for loop does not support

Shigeru Chiba (JIRA) jira-events at lists.jboss.org
Sun May 19 11:45:06 EDT 2013


    [ https://issues.jboss.org/browse/JASSIST-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12775222#comment-12775222 ] 

Shigeru Chiba commented on JASSIST-198:
---------------------------------------

Since the compiler of Javassist is to make it easy to generate bytecode,
it does not support syntax sugars added since Java 5. Your workaround is
correct.
                
> java 6 for loop does not support
> --------------------------------
>
>                 Key: JASSIST-198
>                 URL: https://issues.jboss.org/browse/JASSIST-198
>             Project: Javassist
>          Issue Type: Feature Request
>    Affects Versions: 3.17.1-GA
>         Environment: sun JRE 1.7.0_21 64bits
>            Reporter: Hua Zhang
>            Assignee: Shigeru Chiba
>              Labels: for
>
> for (Object obj : new ArrayList()) ;
> the code above will throw CannotCompileException. Use code below to work around:
> for (java.util.Iterator iter = new ArrayList().iterator(); iter.hasNext(); ) ;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list