diff options
author | Stephan Herrmann | 2015-02-01 14:13:21 +0000 |
---|---|---|
committer | Stephan Herrmann | 2015-02-01 19:38:49 +0000 |
commit | 8f59a94b9bc9afff93c5852fe943af97b1634851 (patch) | |
tree | e28496614a0274ff9a020e35fe8eb790fd75d3fd /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl | |
parent | 7282e6a78d59d5da1ff481c032f539bc6939e619 (diff) | |
download | org.eclipse.objectteams-8f59a94b9bc9afff93c5852fe943af97b1634851.tar.gz org.eclipse.objectteams-8f59a94b9bc9afff93c5852fe943af97b1634851.tar.xz org.eclipse.objectteams-8f59a94b9bc9afff93c5852fe943af97b1634851.zip |
Update jdt.core to I20150129-1830 (M5)
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java index c8f853447..8245d6006 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java @@ -288,6 +288,7 @@ public class CompilerOptions { public static final String VERSION_1_6 = "1.6"; //$NON-NLS-1$ public static final String VERSION_1_7 = "1.7"; //$NON-NLS-1$ public static final String VERSION_1_8 = "1.8"; //$NON-NLS-1$ + public static final String VERSION_1_9 = "1.9"; //$NON-NLS-1$ public static final String ERROR = "error"; //$NON-NLS-1$ public static final String WARNING = "warning"; //$NON-NLS-1$ public static final String IGNORE = "ignore"; //$NON-NLS-1$ @@ -913,6 +914,10 @@ public class CompilerOptions { if (jdkLevel == ClassFileConstants.JDK1_8) return VERSION_1_8; break; + case ClassFileConstants.MAJOR_VERSION_1_9 : + if (jdkLevel == ClassFileConstants.JDK1_9) + return VERSION_1_9; + break; } return Util.EMPTY_STRING; // unknown version } @@ -939,6 +944,8 @@ public class CompilerOptions { return ClassFileConstants.JDK1_7; case '8': return ClassFileConstants.JDK1_8; + case '9': + return ClassFileConstants.JDK1_9; default: return 0; // unknown } @@ -2405,4 +2412,14 @@ public class CompilerOptions { this.warningThreshold.clear(irritant); } } + + /** + * Note, if you have a LookupEnvironment you should instead ask + * {@link org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment#usesNullTypeAnnotations()}. */ + public boolean usesNullTypeAnnotations() { + if (this.useNullTypeAnnotations != null) + return this.useNullTypeAnnotations; + return this.isAnnotationBasedNullAnalysisEnabled + && this.sourceLevel >= ClassFileConstants.JDK1_8; + } } |