StringToString: NPE at method param type fix

This commit is contained in:
Mykhailo Palahuta
2020-08-01 15:13:20 +03:00
parent b48da45701
commit 32a8c042e3
2 changed files with 225 additions and 85 deletions

View File

@ -218,6 +218,24 @@ public class Foo {
throw new RuntimeException();
}
}
}
]]></code>
</test-code>
<test-code>
<description>external class as a method parameter NullPointerException test</description>
<expected-problems>1</expected-problems>
<expected-linenumbers>8</expected-linenumbers>
<code><![CDATA[
import org.springframework.context.MessageSourceResolvable;
public class Foo {
public String getData(MessageSourceResolvable msr) {
return "MSR: " + msr.toString();
}
public void bar() {
String s = getData(new MessageSourceResolvable()).toString();
}
}
]]></code>
</test-code>