Add test case for #4277
This commit is contained in:
@ -85,6 +85,25 @@ final class Test {
|
|||||||
public static String foo(ResultSet r) throws SQLException {
|
public static String foo(ResultSet r) throws SQLException {
|
||||||
return r.getString("bar").toLowerCase();
|
return r.getString("bar").toLowerCase();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]]></code>
|
||||||
|
</test-code>
|
||||||
|
|
||||||
|
<test-code>
|
||||||
|
<description>#4277 FP when invoking a method called toLowerCase on a non-String class</description>
|
||||||
|
<expected-problems>0</expected-problems>
|
||||||
|
<code><![CDATA[
|
||||||
|
public class Foo {
|
||||||
|
public static String generateUlid(boolean uppercase) {
|
||||||
|
Ulid ulid = new Ulid();
|
||||||
|
return uppercase ? ulid.toString() : ulid.toLowerCase(); // not a String, should be ok
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Ulid {
|
||||||
|
public Strinc toLowerCase() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]]></code>
|
]]></code>
|
||||||
</test-code>
|
</test-code>
|
||||||
|
Reference in New Issue
Block a user