projects/guix·blob java-team · refs

35 lines · 1.1 KiB

1Based on the upstream fix for the java8 compilation issue.
2Simplified patch.
3Upstream version of patch does not work with this source tree.
4
5The issue is that in java8 it is an error to pass null to
6removeAll. Results in null pointer exception. java7
7behaviour was to return the list unmodified.
8
9From db2a350c6d90efaa8dde949fa76005c2c5af45c4 Mon Sep 17 00:00:00 2001
10From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <[email protected]>
11Date: Fri, 5 Jan 2018 17:05:31 +0100
12Subject: [PATCH] Fix java8 compilation.
13
14---
15 src/org/antlr/tool/CompositeGrammar.java | 4 +++-
16 1 file changed, 3 insertions(+), 1 deletion(-)
17
18diff --git a/src/org/antlr/tool/CompositeGrammar.java b/src/org/antlr/tool/CompositeGrammar.java
19index f1408e7..7e02431 100644
20--- a/src/org/antlr/tool/CompositeGrammar.java
21+++ b/src/org/antlr/tool/CompositeGrammar.java
22@@ -218,7 +218,9 @@ public class CompositeGrammar {
23 public List<Grammar> getIndirectDelegates(Grammar g) {
24 List<Grammar> direct = getDirectDelegates(g);
25 List<Grammar> delegates = getDelegates(g);
26- delegates.removeAll(direct);
27+ if (direct != null) {
28+ delegates.removeAll(direct);
29+ }
30 return delegates;
31 }
32
33--
342.15.1
35