[pkg-java] r19116 - in trunk/ecj/debian: . patches

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Aug 1 08:03:01 UTC 2016


Author: ebourg-guest
Date: 2016-08-01 08:03:01 +0000 (Mon, 01 Aug 2016)
New Revision: 19116

Added:
   trunk/ecj/debian/patches/fix-readmanager-npe.diff
Modified:
   trunk/ecj/debian/changelog
   trunk/ecj/debian/patches/series
Log:
Fixed a sporadic NullPointerException in ReadManager during the build



Modified: trunk/ecj/debian/changelog
===================================================================
--- trunk/ecj/debian/changelog	2016-08-01 07:49:08 UTC (rev 19115)
+++ trunk/ecj/debian/changelog	2016-08-01 08:03:01 UTC (rev 19116)
@@ -2,6 +2,7 @@
 
   * Team upload.
   * Build with the DH sequencer instead of CDBS (Closes: #806020)
+  * Fixed a sporadic NullPointerException in ReadManager during the build
   * Converted debian/copyright to the Copyright Format 1.0
   * Updated the version of the Maven pom
   * debian/rules: Let DH install the .lintian-overrides files

Added: trunk/ecj/debian/patches/fix-readmanager-npe.diff
===================================================================
--- trunk/ecj/debian/patches/fix-readmanager-npe.diff	                        (rev 0)
+++ trunk/ecj/debian/patches/fix-readmanager-npe.diff	2016-08-01 08:03:01 UTC (rev 19116)
@@ -0,0 +1,19 @@
+Description: Fixes a sporadic NullPointerException in ReadManager when building ecj.
+ This error has been at least observed on amd64 and arm64. The cause is unknown
+ (race condition?) and this workaround may lead to another error later in the build.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/org.eclipse.jdt.core/org/eclipse/jdt/internal/compiler/ReadManager.java
++++ b/src/org.eclipse.jdt.core/org/eclipse/jdt/internal/compiler/ReadManager.java
+@@ -171,7 +171,10 @@
+ 				this.filesRead[position] = unit;
+ 				this.contentsRead[position] = this.readInProcessMarker; // mark the spot so we know its being read
+ 			}
+-			char[] result = unit.getContents();
++			char[] result = unit != null ? unit.getContents() : new char[0];
++			if (unit == null) {
++				System.err.println("ICompilationUnit " + (this.nextFileToRead - 1) + " of " + units.length + " is null");
++			}
+ 			synchronized (this) {
+ 				if (this.filesRead[position] == unit) {
+ 					if (this.contentsRead[position] == null) // wake up main thread which is waiting for this file

Modified: trunk/ecj/debian/patches/series
===================================================================
--- trunk/ecj/debian/patches/series	2016-08-01 07:49:08 UTC (rev 19115)
+++ trunk/ecj/debian/patches/series	2016-08-01 08:03:01 UTC (rev 19116)
@@ -2,3 +2,4 @@
 remove-overrides.diff
 replace-diamond-operators.diff
 remove-javacore.diff
+fix-readmanager-npe.diff




More information about the pkg-java-commits mailing list