GitHub user alexhenrie opened a pull request:
https://github.com/apache/maven/pull/72
String handling issues identified by PMD
The code linting tool [PMD](http://pmd.sourceforge.net/pmd-5.2.0/)
identified numerous places where Maven's string handling is inefficient. I've
prepared a set of patches that should help speed things up.
The command I used was `pmd -d . -R java-strings`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/alexhenrie/maven master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/maven/pull/72.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #72
----
commit 14f3e7f8cae1dc74b616a52f32ac54762fd640ed
Author: Alex Henrie <[email protected]>
Date: 2015-11-20T05:23:08Z
Prefer StringBuilder.append(char) to StringBuilder.append(String)
http://pmd.sourceforge.net/pmd-5.2.0/pmd-java/rules/java/strings.html#AppendCharacterWithChar
commit a78a98aa8eb38bd9d239eadcf72bb7fde04463e1
Author: Alex Henrie <[email protected]>
Date: 2015-11-20T05:23:09Z
Prefer String.indexOf(char) to String.indexOf(String)
http://pmd.sourceforge.net/pmd-5.2.0/pmd-java/rules/java/strings.html#UseIndexOfChar
commit 678103e544bbb28c8afd2a5b7117cc33897cac05
Author: Alex Henrie <[email protected]>
Date: 2015-11-20T05:23:09Z
Combine string literals instead of calling String.append twice
http://pmd.sourceforge.net/pmd-5.2.0/pmd-java/rules/java/strings.html#ConsecutiveLiteralAppends
commit 30f0c2a69a4c447dc2562102dbb324a35f5e77e7
Author: Alex Henrie <[email protected]>
Date: 2015-11-20T05:23:10Z
Construct StringBuffers with enough space to begin with
http://pmd.sourceforge.net/pmd-5.2.0/pmd-java/rules/java/strings.html#InsufficientStringBufferDeclaration
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]