commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject commons-crypto git commit: Fix pmd issues
Date Thu, 30 Jun 2016 06:31:35 GMT
Repository: commons-crypto
Updated Branches:
  refs/heads/master 5b4c302d8 -> 88f3276bc


Fix pmd issues


Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/88f3276b
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/88f3276b
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/88f3276b

Branch: refs/heads/master
Commit: 88f3276bc8607ae306624fc54cf011dc17a9d8e4
Parents: 5b4c302
Author: Sun Dapeng <sdp@apache.org>
Authored: Thu Jun 30 13:56:13 2016 +0800
Committer: Sun Dapeng <sdp@apache.org>
Committed: Thu Jun 30 13:56:13 2016 +0800

----------------------------------------------------------------------
 src/main/java/org/apache/commons/crypto/NativeCodeLoader.java     | 3 +--
 .../org/apache/commons/crypto/random/OpensslCryptoRandom.java     | 3 +--
 .../java/org/apache/commons/crypto/stream/CryptoInputStream.java  | 3 +--
 src/main/java/org/apache/commons/crypto/utils/IOUtils.java        | 3 +--
 src/main/java/org/apache/commons/crypto/utils/Utils.java          | 2 ++
 5 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/88f3276b/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java b/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
index 3dee22c..e176e06 100644
--- a/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
+++ b/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
@@ -59,8 +59,7 @@ final class NativeCodeLoader {
             }
             // Loaded the native library
             nativeLoaded = true;
-        } catch (Throwable t) {
-            // NOPMD: Ignore failure to load
+        } catch (Throwable t) {  // NOPMD: Ignore failure to load
         }
 
         nativeCodeLoaded = nativeLoaded;

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/88f3276b/src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandom.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandom.java b/src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandom.java
index 0728d52..ec014e8 100644
--- a/src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandom.java
+++ b/src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandom.java
@@ -54,8 +54,7 @@ class OpensslCryptoRandom extends Random implements CryptoRandom {
             try {
                 OpensslCryptoRandomNative.initSR();
                 opensslLoaded = true;
-            } catch (Throwable t) {
-                // NOPMD
+            } catch (Throwable t) {// NOPMD
             }
         }
         nativeEnabled = opensslLoaded;

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/88f3276b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
index dbd6d18..655f3b5 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
@@ -205,7 +205,7 @@ public class CryptoInputStream extends InputStream implements
     @Override
     public int read() throws IOException {
         int n;
-        while ((n = read(oneByteBuf, 0, 1)) == 0) {
+        while ((n = read(oneByteBuf, 0, 1)) == 0) { //NOPMD
             /* no op */
         }
         return (n == -1) ? -1 : oneByteBuf[0] & 0xff;
@@ -597,7 +597,6 @@ public class CryptoInputStream extends InputStream implements
             }
         } catch (ReflectiveOperationException e) { // NOPMD
             // Ignore the Reflection exception.
-    
         }
     }
 

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/88f3276b/src/main/java/org/apache/commons/crypto/utils/IOUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/utils/IOUtils.java b/src/main/java/org/apache/commons/crypto/utils/IOUtils.java
index a29c03d..9b47ce7 100644
--- a/src/main/java/org/apache/commons/crypto/utils/IOUtils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/IOUtils.java
@@ -91,8 +91,7 @@ public final class IOUtils {
             if (c != null) {
                 try {
                     c.close();
-                } catch (Throwable e) {
-                    // NOPMD
+                } catch (Throwable e) { // NOPMD
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/88f3276b/src/main/java/org/apache/commons/crypto/utils/Utils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/utils/Utils.java b/src/main/java/org/apache/commons/crypto/utils/Utils.java
index 8996362..d20d2c0 100644
--- a/src/main/java/org/apache/commons/crypto/utils/Utils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/Utils.java
@@ -47,6 +47,8 @@ public final class Utils {
     /**
      * Loads system properties when configuration file of the name
      * {@link ConfigurationKeys#SYSTEM_PROPERTIES_FILE} is found.
+     *
+     * @return the default properties
      */
     private static Properties createDefaultProperties() {
         // default to system


Mime
View raw message