Community
Participate
Working Groups
Using I200208270833 This code IWorkspace ws = testcasesPlugin.getWorkspace(); IWorkspaceRoot root = ws.getRoot(); IProject project = root.getProjects()[0]; IJavaProject jp = JavaCore.create(project); CompilationUnit cu = AST.parseCompilationUnit( "public class Class {void theMethod() {final int i;}}".toCharArray(), "Class", jp); cu.accept(new ASTVisitor() { public boolean visit(VariableDeclarationFragment node) { IVariableBinding binding = node.resolveBinding(); if (!Modifier.isFinal(binding.getModifiers())) { System.out.println("No final modifier on binding"); } return true; } }); produces No final modifier on binding The code for VariableBinding.getModifiers() is public int getModifiers() { if (isField()) { return ((FieldBinding) this.binding).getAccessFlags(); } return 0; } I expected to get back the final modifier - is this a bug or is there some other way I should be getting this information? Thanks Mark
Yes, this is a bug and it will be fixed shortly.
Fixed and released in 2.1 stream.
Verified.
Regression test added (test0377)