diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/DuplicateSwitchLabels.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/DuplicateSwitchLabels.java
index e73a99d99898..79109337bec7 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/DuplicateSwitchLabels.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/DuplicateSwitchLabels.java
@@ -1,9 +1,6 @@
-// duplicate labels
import java.io.*;
-
-public class a {
-
+class DuplicateSwitchLabels {
final int FI = 4;
void f(final int i) {
@@ -24,43 +21,18 @@ public class a {
case FI - 8: break;
}
- final byte b = 127;
-
- switch(i) {
- case b:
- System.out.println("b=" + b + ";");
- case 127:
- System.out.println("MySwitch.MySwitch");
- }
-
-
- // internalize strings
- switch (0) {
- case 0:
- case "\410" == "!0" ? 1 : 0:
- case ""==""+"" ? 3 : 0:
+ final byte b = 127;
+ switch (i) {
+ case b:
+ System.out.println("b=" + b + ";");
+ case 127:
+ System.out.println("MySwitch.MySwitch");
}
- switch (0) {
- case 0:
- //case 1./0 == Double.POSITIVE_INFINITY ? 1 : 0:
-
- //case 1./0 == Float.POSITIVE_INFINITY ? 2 : 0:
-
- // commented out ref
- // does not work when running under JRE
- //case -1./0 == Double.NEGATIVE_INFINITY ? 3 : 0:
- //case -1./0 == Float.NEGATIVE_INFINITY ? 4 : 0:
- //case Double.POSITIVE_INFINITY == Float.POSITIVE_INFINITY ? 5 : 0:
- //case Double.NEGATIVE_INFINITY == Float.NEGATIVE_INFINITY ? 6 : 0:
- //case Double.NaN != Float.NaN ? 7 : 0:
- //case Integer.MIN_VALUE == -2.147483648e9 ? 8 : 0:
- //case Integer.MIN_VALUE == -2.14748365e9f ? 9 : 0:
- //case Long.MIN_VALUE == -9.223372036854776e18 ? 10 : 0:
- //case Long.MIN_VALUE == -9.223372e18f ? 11 : 0:
-
-
-
- }
+ switch (0) {
+ case 0:
+ case "\410" == "!0" ? 1 : 0:
+ case ""==""+"" ? 3 : 0:
+ }
}
}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ExpressionsInSwitch.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ExpressionsInSwitch.java
index 5c725d5ba3dc..6b338264bb42 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ExpressionsInSwitch.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ExpressionsInSwitch.java
@@ -1,29 +1,30 @@
-// constant expressions in switch
-
import java.util.Date;
-class a {
- final int f = -3;
+class ExpressionsInSwitch {
+ final int f = -3;
- void f1() {
- switch (0) {
- case new Integer(0).MAX_VALUE:
- }
- int k=0;
- switch (0) {
- case false ? k : 0:
- case true ? 1 : k:
- }
- boolean b=true;
- switch (0) {
- case false && b ? 0 : 1:
- case true || b ? 2 : 0:
- }
- final Object obj="";
- switch (0) {
- case obj=="" ? 0 : 0:
- case this.f:
- }
+ void f1() {
+ switch (0) {
+ case new Integer(0).MAX_VALUE:
+ }
+
+ int k = 0;
+ switch (0) {
+ case false ? k : 0:
+ case true ? 1 : k:
+ }
+
+ boolean b = true;
+ switch (0) {
+ case false && b ? 0 : 1:
+ case true || b ? 2 : 0:
+ }
+
+ final Object obj = "";
+ switch (0) {
+ case obj=="" ? 0 : 0:
+ case this.f:
+ }
int i = 0;
final Integer I = null;
@@ -32,23 +33,22 @@ class a {
case I.MAX_VALUE:
case Integer.MAX_VALUE:
}
+ }
- }
+ static class b {
+ static final int c = 8;
+ }
- static class b {
- static final int c = 8;
- }
- void cf1() {
+ void cf1() {
final int i = 9;
switch (0) {
case i:
case 2+4:
case f:
- case a.b.c:
+ case ExpressionsInSwitch.b.c:
}
- switch (0) {
- case true ^ true ? 0 : 0:
- }
-
- }
+ switch (0) {
+ case true ^ true ? 0 : 0:
+ }
+ }
}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/SwitchStatement.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/SwitchStatement.java
index 444a3793b381..ad4521c687fa 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/SwitchStatement.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/SwitchStatement.java
@@ -1,6 +1,4 @@
-// switch statement
-
-class a {
+class SwitchStatement {
void m() {
{
case 0:
@@ -10,14 +8,6 @@ class a {
default:
}
- switch (0) {
- case 0;
- }
-
- switch (0) {
- default;
- }
-
switch (0) {
////////////////
/** */