-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
8u20
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
1.8.0_20
ADDITIONAL OS VERSION INFORMATION :
Windws 7
A DESCRIPTION OF THE PROBLEM :
public class Java8Bug {
public Java8Bug() {
new JPanel() {
{
new Runnable() {
@Override
public void run() {
show("test");
}
}.run();
}
};
}
public void show(String string) {
}
}
This compiled in java 7, in java 8 show(String) gets hidden, with the compiler error
error: incompatible types: String cannot be converted to boolean
REGRESSION. Last worked in version 7u10
ADDITIONAL REGRESSION INFORMATION:
1.7_09
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
compile the code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
code compiles
ACTUAL -
compile gives error error: incompatible types: String cannot be converted to boolean
ERROR MESSAGES/STACK TRACES THAT OCCUR :
error: incompatible types: String cannot be converted to boolean
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Java8Bug {
public Java8Bug() {
new JPanel() {
{
new Runnable() {
@Override
public void run() {
show("test");
}
}.run();
}
};
}
public void show(String string) {
}
}
---------- END SOURCE ----------
1.8.0_20
ADDITIONAL OS VERSION INFORMATION :
Windws 7
A DESCRIPTION OF THE PROBLEM :
public class Java8Bug {
public Java8Bug() {
new JPanel() {
{
new Runnable() {
@Override
public void run() {
show("test");
}
}.run();
}
};
}
public void show(String string) {
}
}
This compiled in java 7, in java 8 show(String) gets hidden, with the compiler error
error: incompatible types: String cannot be converted to boolean
REGRESSION. Last worked in version 7u10
ADDITIONAL REGRESSION INFORMATION:
1.7_09
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
compile the code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
code compiles
ACTUAL -
compile gives error error: incompatible types: String cannot be converted to boolean
ERROR MESSAGES/STACK TRACES THAT OCCUR :
error: incompatible types: String cannot be converted to boolean
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Java8Bug {
public Java8Bug() {
new JPanel() {
{
new Runnable() {
@Override
public void run() {
show("test");
}
}.run();
}
};
}
public void show(String string) {
}
}
---------- END SOURCE ----------