[scala] 09/14: The new release fixes the Java 9 compatibility (Closes: #873705)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Mar 30 15:18:21 BST 2018


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

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

commit 7bc7467546480dda3f2579dc975c121a997d340e
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Mar 30 14:16:20 2018 +0200

    The new release fixes the Java 9 compatibility (Closes: #873705)
---
 debian/changelog                              |  2 ++
 debian/patches/0014-disable-jdk-check.patch   | 13 +++++++++++++
 debian/patches/0015-java9-compatibility.patch | 23 +++++++++++++++++++++++
 debian/patches/series                         |  2 ++
 4 files changed, 40 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e512907..ec7c498 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ scala (2.11.12-1) UNRELEASED; urgency=medium
 
   * Team upload.
   * New upstream release
+    - Fixes the Java 9 compatibility at runtime (Closes: #873705)
+    - Patched the project to build with Java 9
     - Refreshed the patches
     - Depend on libjline2-java (>= 2.13)
     - Depend on scala-asm (>= 5.2.0-scala-2)
diff --git a/debian/patches/0014-disable-jdk-check.patch b/debian/patches/0014-disable-jdk-check.patch
new file mode 100644
index 0000000..416fbe0
--- /dev/null
+++ b/debian/patches/0014-disable-jdk-check.patch
@@ -0,0 +1,13 @@
+Description: Don't fail the build if the version of the JDK isn't supported
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/build.xml
++++ b/build.xml
+@@ -531,7 +531,6 @@
+        </or></not>
+     </condition>
+ 
+-    <fail if="has.unsupported.jdk" message="JDK ${ant.java.version} is not supported by this build!"/>
+     <fail message="Ant 1.9+ required">
+       <condition>
+         <not><antversion atleast="1.9" /></not>
diff --git a/debian/patches/0015-java9-compatibility.patch b/debian/patches/0015-java9-compatibility.patch
new file mode 100644
index 0000000..bce8a91
--- /dev/null
+++ b/debian/patches/0015-java9-compatibility.patch
@@ -0,0 +1,23 @@
+Description: Fixes the compatibility with Java 9
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/reflect/scala/reflect/internal/util/AbstractFileClassLoader.scala
++++ b/src/reflect/scala/reflect/internal/util/AbstractFileClassLoader.scala
+@@ -90,7 +90,7 @@
+     }
+   }
+ 
+-  private val packages = mutable.Map[String, Package]()
++  private val _packages = mutable.Map[String, Package]()
+ 
+   override def definePackage(name: String, specTitle: String, specVersion: String, specVendor: String, implTitle: String, implVersion: String, implVendor: String, sealBase: URL): Package = {
+     throw new UnsupportedOperationException()
+@@ -98,7 +98,7 @@
+ 
+   override def getPackage(name: String): Package = findAbstractDir(name) match {
+     case null => super.getPackage(name)
+-    case file => packages.getOrElseUpdate(name, {
++    case file => _packages.getOrElseUpdate(name, {
+       val ctor = classOf[Package].getDeclaredConstructor(classOf[String], classOf[String], classOf[String], classOf[String], classOf[String], classOf[String], classOf[String], classOf[URL], classOf[ClassLoader])
+       ctor.setAccessible(true)
+       ctor.newInstance(name, null, null, null, null, null, null, null, this)
diff --git a/debian/patches/series b/debian/patches/series
index 29c4905..d46772c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,5 @@
 0011-use-local-dependencies.patch
 0012-aether-ant-tasks.patch
 0013-disable-jarlister.patch
+0014-disable-jdk-check.patch
+0015-java9-compatibility.patch

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



More information about the pkg-java-commits mailing list