[libcofoja-java] 06/06: Fixed the compilation errors with Java 8

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Apr 15 14:37:12 UTC 2014


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

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

commit 18b6cbb8de8b8682d8227b50396b2dab5f44c318
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Apr 15 16:35:51 2014 +0200

    Fixed the compilation errors with Java 8
---
 debian/changelog                            |  1 +
 debian/patches/02-java8-compatibility.patch | 38 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 3 files changed, 40 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index eca7ffb..15fbc56 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ cofoja (1.1~r150-1) UNRELEASED; urgency=medium
     - Removed the patch setting the source encoding for javac (fixed upstream)
     - Refreshed 01-remove-version-from-generated-jar.patch
     - Replaced the dependency on libasm3-java with libasm4-java
+  * Fixed the compilation errors with Java 8
   * Compile Cofoja's own contracts
   * Enabled the unit tests
   * Removed debian/local.properties, use Ant command line arguments instead
diff --git a/debian/patches/02-java8-compatibility.patch b/debian/patches/02-java8-compatibility.patch
new file mode 100644
index 0000000..a8d73c9
--- /dev/null
+++ b/debian/patches/02-java8-compatibility.patch
@@ -0,0 +1,38 @@
+Description: Fixes the compilation errors with Java 8
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: http://code.google.com/p/cofoja/issues/detail?id=39
+--- a/src/com/google/java/contract/core/apt/AnnotationProcessor.java
++++ b/src/com/google/java/contract/core/apt/AnnotationProcessor.java
+@@ -18,7 +18,6 @@
+  */
+ package com.google.java.contract.core.apt;
+ 
+-import com.sun.tools.javac.main.OptionName;
+ import com.sun.tools.javac.processing.JavacProcessingEnvironment;
+ import com.sun.tools.javac.util.Options;
+ import com.google.java.contract.AllowUnusedImport;
+@@ -222,12 +221,12 @@
+       Options options = Options.instance(javacEnv.getContext());
+ 
+       if (sourcePath == null) {
+-        sourcePath = options.get(OptionName.SOURCEPATH);
++        sourcePath = options.get("-sourcepath");
+       }
+ 
+       if (classPath == null) {
+-        String classPath1 = options.get(OptionName.CP);
+-        String classPath2 = options.get(OptionName.CLASSPATH);
++        String classPath1 = options.get("-cp");
++        String classPath2 = options.get("-classpath");
+         if (classPath1 != null) {
+           if (classPath2 != null) {
+             classPath = classPath1 + File.pathSeparator + classPath2;
+@@ -240,7 +239,7 @@
+       }
+ 
+       if (outputDirectory == null) {
+-        outputDirectory = options.get(OptionName.D);
++        outputDirectory = options.get("-d");
+       }
+     }
+   }
diff --git a/debian/patches/series b/debian/patches/series
index 46d9b3c..fcf8e41 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01-remove-version-from-generated-jar.patch
+02-java8-compatibility.patch

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



More information about the pkg-java-commits mailing list