Add test case for #4277
This commit is contained in:
parent
6be72b2795
commit
a26717533c
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user