From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZ0Fj-00039X-BB for guix-patches@gnu.org; Tue, 09 Jan 2018 15:12:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZ0Fg-0006yV-J9 for guix-patches@gnu.org; Tue, 09 Jan 2018 15:12:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42050) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZ0Fg-0006yG-Ew for guix-patches@gnu.org; Tue, 09 Jan 2018 15:12:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eZ0Fe-0008Do-Fq for guix-patches@gnu.org; Tue, 09 Jan 2018 15:12:04 -0500 Subject: [bug#30050] [PATCH 1/2] gnu: antlr3-3.1: Fix java8 issue. References: <20180109200230.5043-1-boskovits@gmail.com> In-Reply-To: <20180109200230.5043-1-boskovits@gmail.com> Resent-Message-ID: From: =?UTF-8?Q?G=C3=A1bor?= Boskovits Date: Tue, 9 Jan 2018 21:10:08 +0100 Message-Id: <20180109201008.9948-1-boskovits@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30050@debbugs.gnu.org Cc: =?UTF-8?Q?G=C3=A1bor?= Boskovits * gnu/packages/java.scm (antlr3-3.1)[source]: Add patch. * gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. In java8 it is an error to pass null to removeAll. Fix it. --- gnu/local.mk | 1 + gnu/packages/java.scm | 4 ++- .../patches/antlr3-3_1-fix-java8-compilation.patch | 35 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8ed01eb2f..eb19acd59 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -541,6 +541,7 @@ dist_patch_DATA = \ %D%/packages/patches/agg-am_c_prototype.patch \ %D%/packages/patches/ansible-wrap-program-hack.patch \ %D%/packages/patches/antiword-CVE-2014-8123.patch \ + %D%/packages/patches/antlr3-3_1-fix-java8-compilation.patch \ %D%/packages/patches/apr-skip-getservbyname-test.patch \ %D%/packages/patches/aspell-default-dict-dir.patch \ %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 66db15389..1349906a9 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5194,7 +5194,9 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;")) version ".tar.gz")) (sha256 (base32 - "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")))) + "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) + (patches + (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) (arguments `(#:jar-name (string-append ,name "-" ,version ".jar") #:source-dir "src:runtime/Java/src" diff --git a/gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch b/gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch new file mode 100644 index 000000000..0c4deb024 --- /dev/null +++ b/gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch @@ -0,0 +1,35 @@ +Based on the upstream fix for the java8 compilation issue. +Simplified patch. +Upstream version of patch does not work with this source tree. + +The issue is that in java8 it is an error to pass null to +removeAll. Results in null pointer exception. java7 +behaviour was to return the list unmodified. + +From db2a350c6d90efaa8dde949fa76005c2c5af45c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= +Date: Fri, 5 Jan 2018 17:05:31 +0100 +Subject: [PATCH] Fix java8 compilation. + +--- + src/org/antlr/tool/CompositeGrammar.java | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/org/antlr/tool/CompositeGrammar.java b/src/org/antlr/tool/CompositeGrammar.java +index f1408e7..7e02431 100644 +--- a/src/org/antlr/tool/CompositeGrammar.java ++++ b/src/org/antlr/tool/CompositeGrammar.java +@@ -218,7 +218,9 @@ public class CompositeGrammar { + public List getIndirectDelegates(Grammar g) { + List direct = getDirectDelegates(g); + List delegates = getDelegates(g); +- delegates.removeAll(direct); ++ if (direct != null) { ++ delegates.removeAll(direct); ++ } + return delegates; + } + +-- +2.15.1 + -- 2.15.1