Community
Participate
Working Groups
Compiling the org.eclipse.core.tests.resources project on Linux using the default UTF-8 encoding might lead to an xml log being corrupted because of an AIOOBE in the problem context extraction. Here is the end of the xml log: <source output="/builds/N200703151001/src/plugins/org.eclipse.core.tests.resources/temp.folder/resourcestests.jar.bin" path="/builds/N200703151001/src/plugins/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/filesystem/SymlinkTest.java"> <problems errors="1" problems="1" warnings="0"> <problem charEnd="0" charStart="0" id="InvalidEncoding" line="1" severity="ERROR"> <message value="Cannot read the source from /builds/N200703151001/src/plugins/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/filesystem/SymlinkTest.java; either the file uses a different encoding than UTF-8 or it is corrupted"/> </sources> <exception class="class java.lang.ArrayIndexOutOfBoundsException" message="-1 java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.jdt.internal.compiler.batch.Main$Logger.extractContext(Main.java(Compiled Code)) at org.eclipse.jdt.internal.compiler.batch.Main$Logger.logXmlProblem(Main.java(Compiled Code)) at org.eclipse.jdt.internal.compiler.batch.Main$Logger.logProblems(Main.java(Compiled Code)) "/> </compiler> The <source> element is not properly closed.
Created attachment 61091 [details] Proposed fix When the source unit is empty, there is nothing to do. Patch is safe.
Released for 3.3M6.
Verified for 3.3 M6 using build I20070321-0010 Verified by patching jdtcore to force CompilationUnit#getContents() to throw a CharConversionException