commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1697272 - /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java
Date Sun, 23 Aug 2015 22:38:49 GMT
Author: dbrosius
Date: Sun Aug 23 22:38:49 2015
New Revision: 1697272

URL: http://svn.apache.org/r1697272
Log:
reduce allocations

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java?rev=1697272&r1=1697271&r2=1697272&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java
Sun Aug 23 22:38:49 2015
@@ -138,10 +138,10 @@ public class AnnotationEntry implements
         final StringBuilder result = new StringBuilder();
         result.append("@");
         result.append(getAnnotationType());
-        if (getElementValuePairs().length > 0) {
+        ElementValuePair[] evPairs = getElementValuePairs();
+        if (evPairs.length > 0) {
             result.append("(");
-            for (int i = 0; i < getElementValuePairs().length; i++) {
-                final ElementValuePair element = getElementValuePairs()[i];
+            for (ElementValuePair element : evPairs) {
                 result.append(element.toShortString());
             }
             result.append(")");



Mime
View raw message