Use markdown format
This commit is contained in:
@ -698,9 +698,9 @@ public class C {
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_performance.html#simplifystartswith">
|
||||
<description>
|
||||
Since it passes in a literal of length 1, calls to (string).startsWith can be rewritten using (string).charAt(0)
|
||||
at the expense of some readability. To prevent IndexOutOfBoundsException being thrown by the charAt method,
|
||||
ensure that the (string) is not empty by making an additional check first.
|
||||
Calls to `string.startsWith("x")` with a string literal of length 1 can be rewritten using `string.charAt(0)`,
|
||||
at the expense of some readability. To prevent `IndexOutOfBoundsException` being thrown by the `charAt` method,
|
||||
ensure that the string is not empty by making an additional check first.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
|
Reference in New Issue
Block a user