Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Honnen2018-09-24 08:41:57 +0000
committerJayaprakash Arthanareeswaran2018-09-25 11:12:28 +0000
commit03078cb8798fc5a2c4906469cc5208a85b97d6d5 (patch)
tree46953d1845a091f54e3dedc1570b03c3d371c5bd /org.eclipse.jdt.core
parentd611da01576b31cc8aaf0fbb05c7626715483142 (diff)
downloadeclipse.jdt.core-03078cb8798fc5a2c4906469cc5208a85b97d6d5.tar.gz
eclipse.jdt.core-03078cb8798fc5a2c4906469cc5208a85b97d6d5.tar.xz
eclipse.jdt.core-03078cb8798fc5a2c4906469cc5208a85b97d6d5.zip
Bug 539361 - create multi release jars only for compliance >=1.9
Changed behavior to match the other #forLibrary overload: Return regular ClasspathJar when compliance is <1.9 (or null). Change-Id: I46303fad8c0e98a952ec9440574c05cf8042bc69 Signed-off-by: Julian Honnen <julian.honnen@vector.com>
Diffstat (limited to 'org.eclipse.jdt.core')
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
index 2af8c8ca9d..d501e436cf 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
@@ -152,8 +152,9 @@ public static ClasspathLocation forLibrary(String libraryPathname, AccessRuleSet
static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet, IPath annotationsPath,
boolean autoModule, String compliance) {
- return compliance == null ? new ClasspathJar(library, accessRuleSet, annotationsPath, autoModule) :
- new ClasspathMultiReleaseJar(library, accessRuleSet, annotationsPath, autoModule, compliance);
+ return (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ?
+ new ClasspathJar(library, accessRuleSet, annotationsPath, autoModule) :
+ new ClasspathMultiReleaseJar(library, accessRuleSet, annotationsPath, autoModule, compliance);
}
public static ClasspathLocation forLibrary(ZipFile zipFile, AccessRuleSet accessRuleSet, IPath externalAnnotationPath, boolean isOnModulePath, String compliance) {
return (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ?

Back to the top