Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2014-04-24 14:25:02 +0000
committerStephan Herrmann2014-04-24 14:25:02 +0000
commitc3070e32df88fe00be19774f351a36d4220b7e16 (patch)
treeeb67251538b5a190ea4195f0605d4146fb77c6ac /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl
parentee87a8c921fe46bb5f7f6b65fea6a3707aa703b1 (diff)
downloadorg.eclipse.objectteams-c3070e32df88fe00be19774f351a36d4220b7e16.tar.gz
org.eclipse.objectteams-c3070e32df88fe00be19774f351a36d4220b7e16.tar.xz
org.eclipse.objectteams-c3070e32df88fe00be19774f351a36d4220b7e16.zip
Bug 433423 - [compiler] warn when compiling for OTRE and binding to 1.8
classes - report weaving into binary 1.8 classes
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.java9
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java3
2 files changed, 11 insertions, 1 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 39ba9802f..1821f33fd 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
@@ -223,6 +223,9 @@ public class CompilerOptions {
public static final String OPTION_ReportIgnoringRoleMethodReturn=
"org.eclipse.objectteams.otdt.compiler.problem.ignoring_role_return"; //$NON-NLS-1$
+ public static final String OPTION_ReportOtreWeavingIntoJava8=
+ "org.eclipse.objectteams.otdt.compiler.problem.otre_into_java8"; //$NON-NLS-1$
+
public static final String OPTION_AllowScopedKeywords =
"org.eclipse.objectteams.otdt.compiler.option.scoped_keywords"; //$NON-NLS-1$
@@ -405,6 +408,7 @@ public class CompilerOptions {
public static final int EffectlessFieldaccess= OTJFlag | ASTNode.Bit19;
public static final int UnusedParammap= OTJFlag | ASTNode.Bit20;
public static final int HiddenLiftingProblem= OTJFlag | ASTNode.Bit21;
+ public static final int OTREintoJava8= OTJFlag | ASTNode.Bit22;
// SH}
// Severity level for handlers
@@ -850,6 +854,8 @@ public class CompilerOptions {
return OPTION_ReportAdaptingDeprecated;
case IgnoringRoleReturn:
return OPTION_ReportIgnoringRoleMethodReturn;
+ case OTREintoJava8:
+ return OPTION_ReportOtreWeavingIntoJava8;
// SH}
case NullSpecViolation :
return OPTION_ReportNullSpecViolation;
@@ -1056,6 +1062,7 @@ public class CompilerOptions {
OPTION_ReportAmbiguousLowering,
OPTION_ReportAdaptingDeprecated,
OPTION_ReportIgnoringRoleMethodReturn,
+ OPTION_ReportOtreWeavingIntoJava8,
OPTION_AllowScopedKeywords,
// SH}
OPTION_AnnotationBasedNullAnalysis,
@@ -1491,6 +1498,7 @@ public class CompilerOptions {
optionsMap.put(OPTION_ReportAmbiguousLowering, getSeverityString(AmbiguousLowering));
optionsMap.put(OPTION_ReportAdaptingDeprecated, getSeverityString(AdaptingDeprecated));
optionsMap.put(OPTION_ReportIgnoringRoleMethodReturn, getSeverityString(IgnoringRoleReturn));
+ optionsMap.put(OPTION_ReportOtreWeavingIntoJava8, getSeverityString(OTREintoJava8));
optionsMap.put(OPTION_AllowScopedKeywords, this.allowScopedKeywords? ENABLED : DISABLED);
optionsMap.put(OPTION_PureJavaOnly, this.isPureJava ? ENABLED : DISABLED);
@@ -2018,6 +2026,7 @@ public class CompilerOptions {
if ((optionValue = optionsMap.get(OPTION_ReportAmbiguousLowering)) != null) updateSeverity(AmbiguousLowering, optionValue);
if ((optionValue = optionsMap.get(OPTION_ReportAdaptingDeprecated)) != null) updateSeverity(AdaptingDeprecated, optionValue);
if ((optionValue = optionsMap.get(OPTION_ReportIgnoringRoleMethodReturn)) != null) updateSeverity(IgnoringRoleReturn, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportOtreWeavingIntoJava8)) != null) updateSeverity(OTREintoJava8, optionValue);
if ((optionValue = optionsMap.get(OPTION_AllowScopedKeywords)) != null) {
if (ENABLED.equals(optionValue)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
index aad091660..8656db5b7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
@@ -145,7 +145,8 @@ public class IrritantSet {
| CompilerOptions.WeaveIntoSystemClass
| CompilerOptions.DangerousCallin
| CompilerOptions.AmbiguousLowering
- | CompilerOptions.IgnoringRoleReturn)
+ | CompilerOptions.IgnoringRoleReturn
+ | CompilerOptions.OTREintoJava8)
// SH}
// group-0 warnings enabled by default
.set(

Back to the top