Merge branch 'bug-1556'
This commit is contained in:
@ -724,11 +724,18 @@ have unusual conventions, i.e. Turkish.
|
||||
<value>
|
||||
<![CDATA[
|
||||
//PrimaryExpression
|
||||
[PrimaryPrefix/Name
|
||||
[ends-with(@Image, 'toLowerCase') or ends-with(@Image,
|
||||
'toUpperCase')]
|
||||
[
|
||||
PrimaryPrefix
|
||||
[Name[ends-with(@Image, 'toLowerCase') or ends-with(@Image, 'toUpperCase')]]
|
||||
[following-sibling::PrimarySuffix[position() = 1]/Arguments[@ArgumentCount=0]]
|
||||
|
||||
or
|
||||
|
||||
PrimarySuffix
|
||||
[ends-with(@Image, 'toLowerCase') or ends-with(@Image, 'toUpperCase')]
|
||||
[following-sibling::PrimarySuffix[position() = 1]/Arguments[@ArgumentCount=0]]
|
||||
]
|
||||
[PrimarySuffix[position() = 1]/Arguments[@ArgumentCount=0]]
|
||||
[not(PrimaryPrefix/Name[ends-with(@Image, 'toHexString')])]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
|
@ -56,6 +56,22 @@ public class Foo {
|
||||
String x = "hello world";
|
||||
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>
|
||||
</test-code>
|
||||
|
@ -223,6 +223,7 @@ to avoid XSS attacks.
|
||||
* java-design
|
||||
* [#1512](https://sourceforge.net/p/pmd/bugs/1512/): \[java] Combine rules AvoidConstantsInInterface and ConstantsInInterface
|
||||
* [#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
|
||||
* java-imports
|
||||
* [#1546](https://sourceforge.net/p/pmd/bugs/1546/): \[java] UnnecessaryFullyQualifiedNameRule doesn't take into consideration conflict resolution
|
||||
|
Reference in New Issue
Block a user