Add test case for #4277

This commit is contained in:
Juan Martín Sotuyo Dodero 2024-03-18 00:26:59 -03:00
parent 6be72b2795
commit a26717533c

View File

@ -85,6 +85,25 @@ final class Test {
public static String foo(ResultSet r) throws SQLException {
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>
</test-code>