You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2014/08/28 14:47:26 UTC

svn commit: r1621129 - /uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/crypto/Crypto.java

Author: degenaro
Date: Thu Aug 28 12:47:26 2014
New Revision: 1621129

URL: http://svn.apache.org/r1621129
Log:
UIMA-3995 Fix compiler warnings in 1.1.0

Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/crypto/Crypto.java

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/crypto/Crypto.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/crypto/Crypto.java?rev=1621129&r1=1621128&r2=1621129&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/crypto/Crypto.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/crypto/Crypto.java Thu Aug 28 12:47:26 2014
@@ -253,23 +253,22 @@ public class Crypto implements ICrypto {
 			String fileName = filePub;
 			ObjectInputStream ois = null;
 			DataInputStream dis = null;
-			if(isReadablePublic()) {
-				ois = new ObjectInputStream(new BufferedInputStream(new FileInputStream(fileName)));
-			}
-			else {
-				String ducc_ling = 
-						Utils.resolvePlaceholderIfExists(
-								System.getProperty("ducc.agent.launcher.ducc_spawn_path"),System.getProperties());
-				
-				AlienFile alienFile = new AlienFile(user,fileName,ducc_ling);
-				dis = alienFile.getDataInputStream();
-				ois = new ObjectInputStream(new BufferedInputStream(dis));
-			}
 			try {
+				if(isReadablePublic()) {
+					ois = new ObjectInputStream(new BufferedInputStream(new FileInputStream(fileName)));
+				}
+				else {
+					String ducc_ling = 
+							Utils.resolvePlaceholderIfExists(
+									System.getProperty("ducc.agent.launcher.ducc_spawn_path"),System.getProperties());
+					
+					AlienFile alienFile = new AlienFile(user,fileName,ducc_ling);
+					dis = alienFile.getDataInputStream();
+					ois = new ObjectInputStream(new BufferedInputStream(dis));
+				}
 				BigInteger mod = (BigInteger) ois.readObject();
 			    BigInteger exp = (BigInteger) ois.readObject();
 			    RSAPublicKeySpec publicKeySpec = new RSAPublicKeySpec(mod, exp);
-			    
 			    if(traditional) {
 			    	KeyFactory keyFactory = KeyFactory.getInstance(keyType);
 			    	PublicKey publicKey = keyFactory.generatePublic(publicKeySpec);