Community
Participate
Working Groups
Eclipse Build: I200411230838 JVM: Sun 1.5.0-rc I'm getting the following error. I've managed to confuse myself while trying to get rid of it about why it's happening, so am unsure what steps are necessary to reproduce. Hopefully a stack trace will be enough: java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2583) at org.eclipse.jdt.core.dom.ASTConverter.updateInnerPositions(ASTConverter.java:4937) at org.eclipse.jdt.core.dom.ASTConverter.setTypeForField(ASTConverter.java:4741) at org.eclipse.jdt.core.dom.ASTConverter.convertToFieldDeclaration(ASTConverter.java:2759) at org.eclipse.jdt.core.dom.ASTConverter.checkAndAddMultipleFieldDeclaration(ASTConverter.java:514) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:444) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2547) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1297) at org.eclipse.jdt.core.dom.CompilationUnitResolver.convert(CompilationUnitResolver.java:211) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:729) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:574) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:565) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:494) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:165) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:142) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) Let me know if I need to spend a while to isolate a reproducible case.
Could you please provide the compilation unit that you were editing when this happened? Of course it would be great if you could isolate a reproducable test case. This would definitely help us to fix it.
Ok, I narrowed it down to a bit of code that I now realize is probably illegal Generics usage: public class ASTError { private Map<String, Double>[][] fScoreTable = new Map[10]; }
Even if the code is illegal, the converter should not blow up. I will investigate.
Reproduced. I am working on it.
Fixed and released in HEAD. Regression tests added in ASTConverter15Test.test0076 and test0077.
Verified (in I200412140800) that the test ensures that the source in comment #2 can be parsed and that an AST can be created from it.