Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoj Palat2019-08-09 06:28:44 +0000
committerManoj Palat2019-08-09 06:28:44 +0000
commit46c40e2d5e7faa7adb0ab77120fec85c2cb5218f (patch)
treebfc683884dbc0df79598bc87374a39608dfb70d4
parent90e4b7a03be81687944a4a25ae33289190d03c1c (diff)
downloadeclipse.jdt.core-46c40e2d5e7faa7adb0ab77120fec85c2cb5218f.tar.gz
eclipse.jdt.core-46c40e2d5e7faa7adb0ab77120fec85c2cb5218f.tar.xz
eclipse.jdt.core-46c40e2d5e7faa7adb0ab77120fec85c2cb5218f.zip
Bug 549910 - [13] Preview errors not to be shown when compiling inY20190812-0900
non-preview mode Change-Id: I743731866b2cf4901c75bb6090ebbfd04dcc0a9e Signed-off-by: Manoj Palat <manpalat@in.ibm.com>
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 0bb2e17dd5..cdfc45dc5f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -11082,6 +11082,8 @@ public void autoModuleWithUnstableName(ModuleReference moduleReference) {
moduleReference.sourceEnd);
}
public void switchExpressionIncompatibleResultExpressions(SwitchExpression expression) {
+ if (!this.options.enablePreviewFeatures)
+ return;
TypeBinding type = expression.resultExpressions.get(0).resolvedType;
this.handle(
IProblem.SwitchExpressionsYieldIncompatibleResultExpressionTypes,
@@ -11091,6 +11093,8 @@ public void switchExpressionIncompatibleResultExpressions(SwitchExpression expre
expression.sourceEnd);
}
public void switchExpressionEmptySwitchBlock(SwitchExpression expression) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldEmptySwitchBlock,
NoArgument,
@@ -11099,6 +11103,8 @@ public void switchExpressionEmptySwitchBlock(SwitchExpression expression) {
expression.sourceEnd);
}
public void switchExpressionNoResultExpressions(SwitchExpression expression) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldNoResultExpression,
NoArgument,
@@ -11107,6 +11113,8 @@ public void switchExpressionNoResultExpressions(SwitchExpression expression) {
expression.sourceEnd);
}
public void switchExpressionSwitchLabeledBlockCompletesNormally(Block block) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionaYieldSwitchLabeledBlockCompletesNormally,
NoArgument,
@@ -11115,6 +11123,8 @@ public void switchExpressionSwitchLabeledBlockCompletesNormally(Block block) {
block.sourceEnd);
}
public void switchExpressionLastStatementCompletesNormally(Statement stmt) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionaYieldSwitchLabeledBlockCompletesNormally,
NoArgument,
@@ -11123,6 +11133,8 @@ public void switchExpressionLastStatementCompletesNormally(Statement stmt) {
stmt.sourceEnd);
}
public void switchExpressionIllegalLastStatement(Statement stmt) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldIllegalLastStatement,
NoArgument,
@@ -11131,6 +11143,8 @@ public void switchExpressionIllegalLastStatement(Statement stmt) {
stmt.sourceEnd);
}
public void switchExpressionTrailingSwitchLabels(Statement stmt) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldTrailingSwitchLabels,
NoArgument,
@@ -11139,6 +11153,8 @@ public void switchExpressionTrailingSwitchLabels(Statement stmt) {
stmt.sourceEnd);
}
public void switchExpressionMixedCase(ASTNode statement) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchPreviewMixedCase,
NoArgument,
@@ -11147,6 +11163,8 @@ public void switchExpressionMixedCase(ASTNode statement) {
statement.sourceEnd);
}
public void switchExpressionBreakNotAllowed(ASTNode statement) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldBreakNotAllowed,
NoArgument,
@@ -11163,6 +11181,8 @@ public void switchExpressionsYieldUnqualifiedMethodWarning(ASTNode statement) {
statement.sourceEnd);
}
public void switchExpressionsYieldUnqualifiedMethodError(ASTNode statement) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldUnqualifiedMethodError,
NoArgument,
@@ -11171,6 +11191,8 @@ public void switchExpressionsYieldUnqualifiedMethodError(ASTNode statement) {
statement.sourceEnd);
}
public void switchExpressionsYieldOutsideSwitchExpression(ASTNode statement) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldOutsideSwitchExpression,
NoArgument,
@@ -11179,6 +11201,8 @@ public void switchExpressionsYieldOutsideSwitchExpression(ASTNode statement) {
statement.sourceEnd);
}
public void switchExpressionsYieldRestrictedGeneralWarning(ASTNode statement) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldRestrictedGeneralWarning,
NoArgument,
@@ -11187,6 +11211,8 @@ public void switchExpressionsYieldRestrictedGeneralWarning(ASTNode statement) {
statement.sourceEnd);
}
public void switchExpressionsYieldIllegalStatement(ASTNode statement) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldIllegalStatement,
NoArgument,
@@ -11203,6 +11229,8 @@ public void switchExpressionsYieldTypeDeclarationWarning(ASTNode statement) {
statement.sourceEnd);
}
public void switchExpressionsYieldTypeDeclarationError(ASTNode statement) {
+ if (!this.options.enablePreviewFeatures)
+ return;
this.handle(
IProblem.SwitchExpressionsYieldTypeDeclarationError,
NoArgument,

Back to the top