From 0de1ae638645c2ece3d4276a88dbb261b27310b0 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 18:56:41 +0000 Subject: Avoid use of ArrayUtils git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@51 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/workflow/states/mobilebku/ASITTrustManager.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ASITTrustManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ASITTrustManager.java index 6f557bc6..f4e6be70 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ASITTrustManager.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ASITTrustManager.java @@ -20,13 +20,13 @@ import java.security.KeyStore; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; +import java.util.Arrays; + import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; - import javax.xml.parsers.DocumentBuilderFactory; -import org.apache.commons.lang.ArrayUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; @@ -215,9 +215,11 @@ public class ASITTrustManager implements X509TrustManager { X509Certificate[] default_certs = this.sunJSSEX509TrustManager.getAcceptedIssuers(); - X509Certificate[] atrust_cerst = this.atrustTrustManager.getAcceptedIssuers(); - - return (X509Certificate[]) ArrayUtils.addAll(default_certs, atrust_cerst); + X509Certificate[] atrust_certs = this.atrustTrustManager.getAcceptedIssuers(); + + X509Certificate[] all_certs = Arrays.copyOf(default_certs, default_certs.length + atrust_certs.length); + System.arraycopy(atrust_certs, 0, all_certs, default_certs.length, atrust_certs.length); + return all_certs; } } -- cgit v1.2.3