manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iori...@apache.org
Subject svn commit: r1595709 - /manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/keystore/KeystoreManager.java
Date Mon, 19 May 2014 00:03:16 GMT
Author: iorixxx
Date: Mon May 19 00:03:16 2014
New Revision: 1595709

URL: http://svn.apache.org/r1595709
Log:
CONNECTORS-938 : Use full qualified name for o.a.m.core.common.Base64, because java 8 has
java.util.Base64

Modified:
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/keystore/KeystoreManager.java

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/keystore/KeystoreManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/keystore/KeystoreManager.java?rev=1595709&r1=1595708&r2=1595709&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/keystore/KeystoreManager.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/keystore/KeystoreManager.java
Mon May 19 00:03:16 2014
@@ -82,16 +82,12 @@ public class KeystoreManager implements 
     try
     {
       keystore = KeyStore.getInstance("JKS");
-      byte[] decodedBytes = new Base64().decodeString(base64String);
-      InputStream base64Input = new ByteArrayInputStream(decodedBytes);
-      try
+      byte[] decodedBytes = new org.apache.manifoldcf.core.common.Base64().decodeString(base64String);
+
+      try(InputStream base64Input = new ByteArrayInputStream(decodedBytes))
       {
         keystore.load(base64Input,passcode.toCharArray());
       }
-      finally
-      {
-        base64Input.close();
-      }
     }
     catch (KeyStoreException e)
     {
@@ -283,7 +279,7 @@ public class KeystoreManager implements 
       try
       {
         keystore.store(output,passcode.toCharArray());
-        return new Base64().encodeByteArray(output.toByteArray());
+        return new org.apache.manifoldcf.core.common.Base64().encodeByteArray(output.toByteArray());
       }
       catch (KeyStoreException e)
       {



Mime
View raw message