activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [5/9] activemq-artemis git commit: Use System.arraycopy for copying array
Date Thu, 28 Jul 2016 16:33:00 GMT
Use System.arraycopy for copying array


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/559ae07f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/559ae07f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/559ae07f

Branch: refs/heads/master
Commit: 559ae07f2f5b9bb6219567fcc4de090eb46d5e80
Parents: 68c7c25
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Thu Jul 28 18:17:19 2016 +0300
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Jul 28 12:28:18 2016 -0400

----------------------------------------------------------------------
 .../test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/559ae07f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
index 63d1b71..1f71e14 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
@@ -104,9 +104,7 @@ public class OpenTypeSupportTest {
    private String extractText(CompositeData message) {
       Byte content[] = (Byte[]) message.get(CompositeDataConstants.BODY_PREVIEW);
       byte out[] = new byte[content.length];
-      for (int i = 0; i < content.length; i++) {
-         out[i] = content[i];
-      }
+      System.arraycopy(content, 0, out, 0, content.length);
       return new String(out);
    }
 


Mime
View raw message