commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1716256 - /commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertyPointer.java
Date Tue, 24 Nov 2015 20:49:29 GMT
Author: britter
Date: Tue Nov 24 20:49:28 2015
New Revision: 1716256

URL: http://svn.apache.org/viewvc?rev=1716256&view=rev
Log:
Replace manual array copying with System.arraycopy

Modified:
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertyPointer.java

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertyPointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertyPointer.java?rev=1716256&r1=1716255&r2=1716256&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertyPointer.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertyPointer.java
Tue Nov 24 20:49:28 2015
@@ -78,9 +78,7 @@ public class DynamicPropertyPointer exte
         if (names == null) {
             String[] allNames = handler.getPropertyNames(getBean());
             names = new String[allNames.length];
-            for (int i = 0; i < names.length; i++) {
-                names[i] = allNames[i];
-            }
+            System.arraycopy(allNames, 0, names, 0, names.length);
             Arrays.sort(names);
             if (requiredPropertyName != null) {
                 int inx = Arrays.binarySearch(names, requiredPropertyName);



Mime
View raw message