Community
Participate
Working Groups
On eclipse 3.0.1, using 1.2 AJDT installed via the Eclipse updating/installing system, if I have an empty file in a package (i.e. no package header), the compiler will fail with an internal compilation error indicating an error on the previous (well-formed) file. I'm not sure if this is an aspectj or ajdt issue, but I thought I'd start here.
I haven't managed to reproduce this. What is the name of your empty file, and is it completely empty (i.e. 0 bytes)? And can you paste the compiler error in here? (It should still be in your workspace/.metadata/.log file)
No response, so closing for now, as I can't progress this without the above info. Please reopen if/when you can provide this info.
sorry it took so long to get back on this. I've recreated this in eclipse 3.1 with: AJDT: Version: 1.2.0 Build id: 20041214165937 AspectJ version: 1.5.0M1 The error is: Severity Description Resource In Folder Location Creation Time 2 Internal compiler error java.lang.ArrayIndexOutOfBoundsException: 0 at org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(Util.java:359) at org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(Util.java:178) at org.aspectj.org.eclipse.jdt.internal.compiler.batch.CompilationUnit.getContents(CompilationUnit.java:57) at org.aspectj.org.eclipse.jdt.internal.compiler.parser.TheOriginalJDTParserClass.parse(TheOriginalJDTParserClass.java:5722) at org.aspectj.org.eclipse.jdt.internal.compiler.parser.TheOriginalJDTParserClass.parse(TheOriginalJDTParserClass.java:5704) at org.aspectj.org.eclipse.jdt.internal.compiler.parser.TheOriginalJDTParserClass.dietParse(TheOriginalJDTParserClass.java:4422) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:319) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:348) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:682) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:168) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:102) at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:122) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:165) Graph.java MaterialsWISDM/src/gov/sandia/emc/matwisdm/datawrappers March 25, 2005 2:38:30 PM The name of the empty file is GraphDecoder.java; the file this fails on is Graph.java (which is immediately before the empty file in package explorer)
oh, and GraphDecoder.java is indeed 0 bytes.
The expection is coming from the compiler, so passing over to AspectJ
This bug may already be fixed...... This bug was raised and reproduced by Chris using AspectJ 1.5.0M1 which was dated Friday 10th December 2004. At this point the compiler contained Eclipse 3.0 final JDT core. The next update of the compiler took place on 6th January 2005 and was an upgrade to the Eclipse 3.1v530a compiler which in particular included an update to the failing method: org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(Util.java:359) with if ("UTF-8".equals(encoding)) { .... changed to if (length > 0 && "UTF-8".equals(encoding)) { .... This change was made by JDT in response to bug 70598 which was raised against jdt core 3.0 and reports exactly the exception as is reported here (obviously, except for the prefix "org.aspectj"). I'm not sure how to force UTF-8 encoding so have been unable to verify this.
Closing this bug as fixed as per comment #6.