You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2016/06/16 14:04:29 UTC

commons-crypto git commit: Fix some compiler warnings

Repository: commons-crypto
Updated Branches:
  refs/heads/master 09d42c60c -> c282329b3


Fix some compiler warnings

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

Branch: refs/heads/master
Commit: c282329b3114a3c7039e8a4d1b89daedfce16120
Parents: 09d42c6
Author: Sebb <se...@apache.org>
Authored: Thu Jun 16 15:04:24 2016 +0100
Committer: Sebb <se...@apache.org>
Committed: Thu Jun 16 15:04:24 2016 +0100

----------------------------------------------------------------------
 src/main/java/org/apache/commons/crypto/utils/Utils.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/c282329b/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 a36f215..b41045c 100644
--- a/src/main/java/org/apache/commons/crypto/utils/Utils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/Utils.java
@@ -115,14 +115,15 @@ public final class Utils {
 
             Class<?>[] interfaces = buffer.getClass().getInterfaces();
 
-            for (Class clazz : interfaces) {
+            for (Class<?> clazz : interfaces) {
                 if (clazz.getName().equals(sunClass.getName())) {
+                    final Object[] NO_PARAM = new Object[0];
                     /* DirectBuffer#cleaner() */
                     Method getCleaner = sunClass.getMethod("cleaner");
-                    Object cleaner = getCleaner.invoke(buffer, null);
+                    Object cleaner = getCleaner.invoke(buffer, NO_PARAM);
                     /* Cleaner#clean() */
                     Method cleanMethod = cleanerClass.getMethod("clean");
-                    cleanMethod.invoke(cleaner, null);
+                    cleanMethod.invoke(cleaner, NO_PARAM);
                     return;
                 }
             }