Fixes #1556 [java] UseLocaleWithCaseConversions does not works with ResultSet
(false negative)
This commit is contained in:
@ -723,12 +723,18 @@ have unusual conventions, i.e. Turkish.
|
|||||||
<property name="xpath">
|
<property name="xpath">
|
||||||
<value>
|
<value>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
//PrimaryExpression
|
//PrimaryExpression[not(PrimaryPrefix/Name[ends-with(@Image, 'toHexString')])]
|
||||||
[PrimaryPrefix/Name
|
[
|
||||||
[ends-with(@Image, 'toLowerCase') or ends-with(@Image,
|
PrimaryPrefix
|
||||||
'toUpperCase')]
|
[following-sibling::PrimarySuffix[position() = 1]/Arguments[@ArgumentCount=0]]
|
||||||
|
/Name[ends-with(@Image, 'toLowerCase') or ends-with(@Image, 'toUpperCase')]
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
PrimarySuffix
|
||||||
|
[following-sibling::PrimarySuffix[position() = 1]/Arguments[@ArgumentCount=0]]
|
||||||
|
[ends-with(@Image, 'toLowerCase') or ends-with(@Image, 'toUpperCase')]
|
||||||
]
|
]
|
||||||
[PrimarySuffix[position() = 1]/Arguments[@ArgumentCount=0]]
|
|
||||||
]]>
|
]]>
|
||||||
</value>
|
</value>
|
||||||
</property>
|
</property>
|
||||||
|
@ -56,6 +56,22 @@ public class Foo {
|
|||||||
String x = "hello world";
|
String x = "hello world";
|
||||||
return x.toUpperCase(Locale.GERMANY).trim();
|
return x.toUpperCase(Locale.GERMANY).trim();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]]></code>
|
||||||
|
</test-code>
|
||||||
|
|
||||||
|
<test-code>
|
||||||
|
<description>#1556 [java] UseLocaleWithCaseConversions does not works with `ResultSet` (false negative)</description>
|
||||||
|
<expected-problems>1</expected-problems>
|
||||||
|
<code><![CDATA[
|
||||||
|
import java.sql.*;
|
||||||
|
|
||||||
|
final class Test {
|
||||||
|
private Test() { }
|
||||||
|
|
||||||
|
public static String foo(ResultSet r) throws SQLException {
|
||||||
|
return r.getString("bar").toLowerCase();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]]></code>
|
]]></code>
|
||||||
</test-code>
|
</test-code>
|
||||||
|
@ -35,6 +35,7 @@ This is a bug fixing release, no major changes were introduced.
|
|||||||
|
|
||||||
* java-design
|
* java-design
|
||||||
* [#1552](https://sourceforge.net/p/pmd/bugs/1552/): \[java] MissingBreakInSwitch - False positive for continue
|
* [#1552](https://sourceforge.net/p/pmd/bugs/1552/): \[java] MissingBreakInSwitch - False positive for continue
|
||||||
|
* [#1556](https://sourceforge.net/p/pmd/bugs/1556/): \[java] UseLocaleWithCaseConversions does not works with `ResultSet` (false negative)
|
||||||
* [#177](https://github.com/pmd/pmd/issues/177): \[java] SingularField with lambdas as final fields
|
* [#177](https://github.com/pmd/pmd/issues/177): \[java] SingularField with lambdas as final fields
|
||||||
* java-imports
|
* java-imports
|
||||||
* [#1546](https://sourceforge.net/p/pmd/bugs/1546/): \[java] UnnecessaryFullyQualifiedNameRule doesn't take into consideration conflict resolution
|
* [#1546](https://sourceforge.net/p/pmd/bugs/1546/): \[java] UnnecessaryFullyQualifiedNameRule doesn't take into consideration conflict resolution
|
||||||
|
Reference in New Issue
Block a user