You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/07/28 16:33:00 UTC

[5/9] activemq-artemis git commit: Use System.arraycopy for copying array

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� <vi...@iki.fi>
Authored: Thu Jul 28 18:17:19 2016 +0300
Committer: Clebert Suconic <cl...@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);
    }