Summary: | Annotation on class cancels "public" modifier | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Carl McConnell <carl_mcconnell> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M3 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Carl McConnell
2004-10-28 17:57:26 EDT
Below is the code I used to determine if the class in the description is public. The code returns false when it should return true for that class. (Apologies for any errors in the code: I had to collapse together some scattered methods, and may have made a mistake.) ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file); ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setSource(cu); CompilationUnit cuNode = (CompilationUnit) parser.createAST(null); TypeDeclaration type = (TypeDeclaration) cuNode.types().get(0); return Modifier.isPublic(type.getModifiers()); Fixed and released in HEAD. Regression test added. Verified for 3.1M3 with build I20041102 |