forked from phoedos/pmd
Fixed bug 1627830 - False+ UseLocaleWithCaseConversions
The XPath was looking for any ArgumentCount==0, it should only look at one spot git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4946 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -6,6 +6,7 @@ Fixed bug 1626715 - UseAssertSameInsteadOfAssertTrue now correctly checks classe
|
||||
Fixed bug 1531216 - ImmutableField. NameOccurrence.isSelfAssignment now recognizes this.x++ as a self assignment
|
||||
Fixed bug 1634078 - StringToString now recognizes toString on a String Array, rather than an element.
|
||||
Fixed bug 1631646 - UselessOperationOnImmutable doesn't throw on variable.method().variable.
|
||||
Fixed bug 1627830 - UseLocaleWithCaseConversions now works with compound string operations
|
||||
Applied patch 1612455 - RFE 1411022 CompareObjectsWithEquals now catches the case where comparison is against new Object
|
||||
XPath rules are now chained together for an extra speedup in processing
|
||||
|
||||
|
@ -42,6 +42,20 @@ toHexString OK
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
String x = y.toHexString().toUpperCase();
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
Compound method call
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
public String getString(){
|
||||
String x = "hello world";
|
||||
return x.toUpperCase(Locale.GERMANY).trim();
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
@ -712,7 +712,7 @@ class Foo {
|
||||
[ends-with(@Image, 'toLowerCase') or ends-with(@Image,
|
||||
'toUpperCase')]
|
||||
]
|
||||
[PrimarySuffix/Arguments[@ArgumentCount=0]]
|
||||
[PrimarySuffix[position() = 1]/Arguments[@ArgumentCount=0]]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
|
Reference in New Issue
Block a user