Add test for #1533 [java] BooleanInstantiation: ClassCastException with Annotation

This commit is contained in:
Andreas Dangel
2016-10-29 17:12:20 +02:00
parent 8667aea076
commit 5d11e77208

View File

@ -155,6 +155,18 @@ Test for failure after rule with custom Boolean, should report failure if rule r
<code><![CDATA[
public class Foo {
Boolean b = Boolean.valueOf("true");
}
]]></code>
</test-code>
<test-code>
<description>#1533 [java] BooleanInstantiation: ClassCastException with Annotation</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class Foo {
public void bar() {
Object o = new @Interned MyObject();
}
}
]]></code>
</test-code>