Update performance.xml

Added missing CDATA
This commit is contained in:
Tobias Weimer
2018-01-07 19:19:17 +01:00
committed by GitHub
parent af4c5b2a87
commit fd51f6254a

View File

@ -788,6 +788,7 @@ public class SimpleTest extends TestCase {
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_performance.html#usearraysaslist">
<description>
<![CDATA[
The java.util.Arrays class has a "asList" method that should be used when you want to create a new List from
an array of objects. It is faster than executing a loop to copy all the elements of the array one by one.
@ -795,7 +796,8 @@ Note that the result of Arrays.asList() is backed by the specified array,
changes in the returned list will result in the array to be modified.
For that reason, it is not possible to add new elements to the returned list of Arrays.asList() (UnsupportedOperationException).
You must use new ArrayList<>(Arrays.asList(...)) if that is inconvenient for you (e.g. because of concurrent access).
</description>
]]>
</description>
<priority>3</priority>
<properties>
<property name="xpath">