[Git][java-team/plexus-compiler][master] Reverted the modification setting the 'release' attribute automatically
Emmanuel Bourg
gitlab at salsa.debian.org
Tue Jul 3 12:23:21 BST 2018
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / plexus-compiler
Commits:
db376a85 by Emmanuel Bourg at 2018-07-03T13:19:06+02:00
Reverted the modification setting the 'release' attribute automatically
- - - - -
2 changed files:
- debian/changelog
- debian/patches/auto-adjust-language-level.patch
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+plexus-compiler (2.8.4-2) unstable; urgency=medium
+
+ * Team upload.
+ * Reverted the modification setting the 'release' attribute automatically
+ since this renders the internal JDK APIs unavailable at compile time.
+
+ -- Emmanuel Bourg <ebourg at apache.org> Tue, 03 Jul 2018 13:18:47 +0200
+
plexus-compiler (2.8.4-1) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/auto-adjust-language-level.patch
=====================================
--- a/debian/patches/auto-adjust-language-level.patch
+++ b/debian/patches/auto-adjust-language-level.patch
@@ -3,61 +3,8 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java
+++ b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java
-@@ -195,6 +195,18 @@
+@@ -339,12 +339,20 @@
}
- }
-
-+ protected static boolean isJava9()
-+ {
-+ try
-+ {
-+ return Float.valueOf( System.getProperty( "java.class.version", "0" ) ).intValue() >= 53;
-+ }
-+ catch ( Exception e )
-+ {
-+ return false;
-+ }
-+ }
-+
- public String[] createCommandLine( CompilerConfiguration config )
- throws CompilerException
- {
-@@ -337,14 +349,54 @@
- args.add( "--release" );
- args.add( config.getReleaseVersion() );
- }
-+ else if ( isJava9() )
-+ {
-+ List<String> unsupportedLanguageLevels = java.util.Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6"});
-+
-+ String source = config.getSourceVersion();
-+ String target = config.getTargetVersion();
-+ String release = null;
-+
-+ if ( !StringUtils.isEmpty( target ) && !unsupportedLanguageLevels.contains( target ) )
-+ {
-+ System.err.println( "Release parameter not specified, defaulting to the value of the target parameter (" + target + ")" );
-+ release = target;
-+ }
-+ else if ( !StringUtils.isEmpty( source ) && !unsupportedLanguageLevels.contains( source ) )
-+ {
-+ System.err.println( "Release parameter not specified, defaulting to the value of the source parameter (" + source + ")" );
-+ release = source;
-+ }
-+ else
-+ {
-+ release = "7";
-+ System.err.println( "Release parameter not specified, defaulting to the minimum supported value (" + release + ")" );
-+ }
-+
-+ if ( release.startsWith( "1." ))
-+ {
-+ release = release.substring( 2 );
-+ }
-+
-+ args.add( "--release" );
-+ args.add( release );
-+ }
else
{
+ List<String> unsupportedLanguageLevels = java.util.Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5"});
@@ -78,7 +25,7 @@ Forwarded: not-needed
}
else
{
-@@ -356,7 +408,13 @@
+@@ -356,7 +364,13 @@
{
// If omitted, later JDKs complain about a 1.1 target
args.add( "-source" );
View it on GitLab: https://salsa.debian.org/java-team/plexus-compiler/commit/db376a85ada6dcd5469b860879342c8f927d7da6
--
View it on GitLab: https://salsa.debian.org/java-team/plexus-compiler/commit/db376a85ada6dcd5469b860879342c8f927d7da6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180703/a313a942/attachment.html>
More information about the pkg-java-commits
mailing list