This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository ecj.

commit c754d818cabf17a34345d2b31a6163760b7a7afb
Author: Emmanuel Bourg <ebo...@apache.org>
Date:   Mon Aug 1 08:03:01 2016 +0000

    Fixed a sporadic NullPointerException in ReadManager during the build
---
 debian/changelog                        |  1 +
 debian/patches/fix-readmanager-npe.diff | 19 +++++++++++++++++++
 debian/patches/series                   |  1 +
 3 files changed, 21 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index edbafd9..b235c4b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ ecj (3.11.0-2) UNRELEASED; urgency=medium
 
   * 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
diff --git a/debian/patches/fix-readmanager-npe.diff 
b/debian/patches/fix-readmanager-npe.diff
new file mode 100644
index 0000000..39836c6
--- /dev/null
+++ b/debian/patches/fix-readmanager-npe.diff
@@ -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 <ebo...@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
diff --git a/debian/patches/series b/debian/patches/series
index 48307ae..341ec87 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ gcc-changes.diff
 remove-overrides.diff
 replace-diamond-operators.diff
 remove-javacore.diff
+fix-readmanager-npe.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/ecj.git

_______________________________________________
pkg-java-commits mailing list
pkg-java-comm...@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to