cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1498445 - /cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java
Date Mon, 01 Jul 2013 13:43:38 GMT
Author: ay
Date: Mon Jul  1 13:43:38 2013
New Revision: 1498445

URL: http://svn.apache.org/r1498445
Log:
build fix jdk15 for cxf-5095

Modified:
    cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java?rev=1498445&r1=1498444&r2=1498445&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java
Mon Jul  1 13:43:38 2013
@@ -19,7 +19,7 @@
 
 package org.apache.cxf.jaxws.context;
 
-import java.util.Arrays;
+import java.lang.reflect.Array;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -81,7 +81,9 @@ class WrappedAttachments implements Set<
     @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] a) {
         Object[] obj = toArray();
-        return (T[])Arrays.copyOf(obj, obj.length, a.getClass());
+        T[] copy = (T[])Array.newInstance(a.getClass(), obj.length);
+        System.arraycopy(obj, 0, copy, 0, obj.length);
+        return copy;
     }
 
     public boolean add(Attachment e) {



Mime
View raw message