Summary: | [compiler] Missing compile error for trailing comma in annotation | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Hans Hofmann <hans.hofmann> | ||||
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||
Status: | RESOLVED DUPLICATE | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | hans.hofmann, Olivier_Thomann | ||||
Version: | 3.3 | ||||||
Target Milestone: | 3.2 M3 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
This is perfectly legitimate. Closing as a dup of bug 112433. *** This bug has been marked as a duplicate of bug 112433 *** |
Created attachment 82506 [details] Sources to reproduce the problem Build ID: M20070921-1145 Steps To Reproduce: 1. Create a new Java project 2. Create a JUnit4 Testcase skeleton,e.g. package com.foo; public class FooTestCase { } 3. Create a JUnit4 TestSuite aggregating the TestCase and use a trailing comma in the after the last element in the annotation, e.g. package com.foo; import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses( { FooTestCase.class, }) public class FooTestSuite { } 4. Add JUnit4 to compilation classpath 5. Project does compile without errors Problem: compiling the sources with standard javac (1.5.0_13-b05) results in an error com/foo/FooTestSuite.java:7: illegal start of expression @Suite.SuiteClasses( { FooTestCase.class, }) ^ 1 error More information: