Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1251

XSP compile failure when using Java 1.5 features

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.5
    • 2.1.11
    • Blocks: XSP
    • None
    • Operating System: Linux
      Platform: PC
    • 30971

    Description

      I am trying to use the new JDK1.5 foreach loop in XSP, basically:

      List entries = new ArrayList();
      for (Map entry: entries) {
              ...
      }

      which causes the following error with the default EclipseJavaCompiler:

      // start error (lines 1003-1003) "Syntax error on token ":", ";"
      expected"
                                                      for (Map entry: entries)
      {

      // end error

      or even with the Javac compiler:

      /home/tomcat/work/Default/beta.hostmaster.org/_/cocoon-
      files/org/apache/cocoon/www/Dictionary_xsp.java:1003: ';' expected.
                                                      for (Map entry: entries)
      {

      Cocoon is running under Tomcat 5.0.28 on j2sdk-1.5.0-beta2-b51.

      Attachments

        Activity

          People

            antonio Antonio Gallardo Rivera
            thomasz@hostmaster.org Thomas Zehetbauer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: