jdk-24/test/langtools/tools/javac/classfiles/attributes/ConstantValue/BrokenConstantValue.java
Jan Lahoda f033152eae 8228502: javac crashed on a broken classfile with ConstantValue attribute on a field of type Object
Produce an error when reading a classfile with a field with ConstantValue with a wrong type.

Reviewed-by: vromero
2019-08-13 10:27:34 +02:00

10 lines
272 B
Java

/* @test /nodynamiccopyright/
* @compile HasBrokenConstantValue.jcod
* @compile/fail/ref=BrokenConstantValue.out -XDrawDiagnostics BrokenConstantValue.java
*/
public class BrokenConstantValue {
void t() {
String s = HasBrokenConstantValue.VALUE;
}
}