[bnd] 19/32: Target Java 8: Bytecode targeting Java < 8 does not work with default interface methods

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Sat Mar 10 07:27:32 GMT 2018


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

seamlik-guest pushed a commit to branch master
in repository bnd.

commit accb16a76f661f061ade3f0ac7b7ed200fce172b
Author: 殷啟聰 | Kai-Chung Yan <seamlikok at gmail.com>
Date:   Sat Mar 3 14:36:58 2018 +0800

    Target Java 8: Bytecode targeting Java < 8 does not work with default interface methods
---
 debian/bnd.sh                            |  3 +--
 debian/control                           |  2 +-
 debian/patches/java8-compatibility.patch | 15 +++++++++++++--
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/debian/bnd.sh b/debian/bnd.sh
index 7859163..874fe61 100644
--- a/debian/bnd.sh
+++ b/debian/bnd.sh
@@ -3,8 +3,7 @@
 # Include the wrappers utility script
 . /usr/lib/java-wrappers/java-wrappers.sh
 
-# We need a java5 runtime
-find_java_runtime java5
+find_java_runtime java8
 
 # Define our classpath
 find_jars bnd
diff --git a/debian/control b/debian/control
index 99c64a9..53e4d72 100644
--- a/debian/control
+++ b/debian/control
@@ -36,7 +36,7 @@ Homepage: http://bnd.bndtools.org/
 Package: bnd
 Architecture: all
 Depends:
- default-jre-headless | java6-runtime-headless,
+ default-jre-headless | java8-runtime-headless,
  java-wrappers,
  junit4,
  libfelix-framework-java,
diff --git a/debian/patches/java8-compatibility.patch b/debian/patches/java8-compatibility.patch
index 93f75e5..a82ade0 100644
--- a/debian/patches/java8-compatibility.patch
+++ b/debian/patches/java8-compatibility.patch
@@ -1,14 +1,25 @@
 Description: Fixes the compilation errors with Java 8
+ Also explicitly sets compilation target to 8 since invoking default interface methods does not
+ work for bytecode targeting > 8.
 Author: Emmanuel Bourg
 Forwarded: no
 --- a/aQute.libg/src/aQute/lib/collections/SortedList.java
 +++ b/aQute.libg/src/aQute/lib/collections/SortedList.java
-@@ -465,4 +465,8 @@
+@@ -465,4 +465,7 @@
  		return (SortedSet<T>) EMPTY;
  	}
  
 +	public java.util.Spliterator<T> spliterator() {
 +		return SortedSet.super.spliterator();
 +	}
-+
  }
+--- a/cnf/eclipse/jdt.bnd
++++ b/cnf/eclipse/jdt.bnd
+@@ -1,4 +1,4 @@
+ -include: ${project}/.settings/org.eclipse.jdt.core.prefs
+-javac.source 			= ${org.eclipse.jdt.core.compiler.source}
+-javac.target 			= ${org.eclipse.jdt.core.compiler.codegen.targetPlatform}
+-javac.compliance 		= ${org.eclipse.jdt.core.compiler.compliance}
++javac.source 			= 8
++javac.target 			= 8
++javac.compliance 		= 8

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



More information about the pkg-java-commits mailing list