In the following code does not reports any warning:
import java.sql.*;
final class Test {
private Test() { }
public static String foo(ResultSet r) throws SQLException {
return r.getString("bar").toLowerCase();
}
}
while FindBugs 3.0.1 reports the following:
DM_CONVERT_CASE: Consider using Locale parameterized version of invoked method
A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. Use the
String.toUpperCase( Locale l )
String.toLowerCase( Locale l )
versions instead.
ResultSet
--> [java] UseLocaleWithCaseConversions does not works withResultSet
ResultSet
--> [java] UseLocaleWithCaseConversions does not works withResultSet
(false negative)This will be fixed with PMD 5.4.4, 5.5.3 and later.