all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gábor Boskovits" <boskovits@gmail.com>
To: 30050@debbugs.gnu.org
Cc: "Gábor Boskovits" <boskovits@gmail.com>
Subject: [bug#30050] [PATCH 2/2] gnu: antlr3-3.3: Fix java8 issue.
Date: Tue,  9 Jan 2018 21:12:16 +0100	[thread overview]
Message-ID: <20180109201216.11044-1-boskovits@gmail.com> (raw)
In-Reply-To: <20180109200230.5043-1-boskovits@gmail.com>

* gnu/packages/java.scm: Add missing copyright line.
* gnu/packages/java.scm (antlr3-3.3)[source]: Add patch.
* gnu/packages/patches/antlr3-3_3-fix-java8-compilation.patch: New file.
* gnu/local.mk: Update copyright line.
* gnu/local.mk (dist_patch_DATA): Add it.

In java8 it is an error to pass null to removeAll. Fix it.
---
 gnu/local.mk                                       |  3 +-
 gnu/packages/java.scm                              |  5 +++-
 .../patches/antlr3-3_3-fix-java8-compilation.patch | 35 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/antlr3-3_3-fix-java8-compilation.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index eb19acd59..0c41bcd2a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -15,7 +15,7 @@
 # Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 # Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 # Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
-# Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
+# Copyright © 2017, 2018 Gábor Boskovits <boskovits@gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -542,6 +542,7 @@ dist_patch_DATA =						\
   %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/antlr3-3_3-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 1349906a9..e1e9093df 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018 Gábor Boskovits <boskovits@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5103,7 +5104,9 @@ tree walking, and translation.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))))
+                "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
+              (patches
+               (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
     (arguments
      `(#:jar-name (string-append ,name "-" ,version ".jar")
        #:source-dir (string-join '("tool/src/main/java"
diff --git a/gnu/packages/patches/antlr3-3_3-fix-java8-compilation.patch b/gnu/packages/patches/antlr3-3_3-fix-java8-compilation.patch
new file mode 100644
index 000000000..a7d6be9b6
--- /dev/null
+++ b/gnu/packages/patches/antlr3-3_3-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 43867d50c05d1c06ab7220eb974a8874ae10c308 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com>
+Date: Fri, 5 Jan 2018 19:08:24 +0100
+Subject: [PATCH] Fix java8 complilation error.
+
+---
+ tool/src/main/java/org/antlr/tool/CompositeGrammar.java | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tool/src/main/java/org/antlr/tool/CompositeGrammar.java b/tool/src/main/java/org/antlr/tool/CompositeGrammar.java
+index f34ea73..63740a6 100644
+--- a/tool/src/main/java/org/antlr/tool/CompositeGrammar.java
++++ b/tool/src/main/java/org/antlr/tool/CompositeGrammar.java
+@@ -226,7 +226,9 @@ public class CompositeGrammar {
+ 	public List<Grammar> getIndirectDelegates(Grammar g) {
+ 		List<Grammar> direct = getDirectDelegates(g);
+ 		List<Grammar> delegates = getDelegates(g);
+-		delegates.removeAll(direct);
++		if(direct != null) {
++		        delegates.removeAll(direct);
++		}
+ 		return delegates;
+ 	}
+ 
+-- 
+2.15.1
+
-- 
2.15.1

  parent reply	other threads:[~2018-01-09 20:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 20:02 [bug#30050] [PATCH 0/2 core-updates] Fix antlr3 bootstrap toolchain to work on java8 Gábor Boskovits
2018-01-09 20:10 ` [bug#30050] [PATCH 1/2] gnu: antlr3-3.1: Fix java8 issue Gábor Boskovits
2018-01-09 20:12 ` Gábor Boskovits [this message]
2018-03-04  9:10 ` [bug#30050] Please push this to master Gábor Boskovits
2018-03-04 16:52 ` [bug#30050] [PATCH 0/2 core-updates] Fix antlr3 bootstrap toolchain to work on java8 Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180109201216.11044-1-boskovits@gmail.com \
    --to=boskovits@gmail.com \
    --cc=30050@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.