You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2016/06/12 11:52:18 UTC
[1/2] commons-crypto git commit: Remove redundant array creation for
varargs argument
Repository: commons-crypto
Updated Branches:
refs/heads/master 6b3f3b54c -> 305b82608
Remove redundant array creation for varargs argument
Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/d7423f08
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/d7423f08
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/d7423f08
Branch: refs/heads/master
Commit: d7423f08f2908c63f37a251a72a3cee8c6a10889
Parents: 6b3f3b5
Author: Benedikt Ritter <be...@gmail.com>
Authored: Sun Jun 12 13:51:29 2016 +0200
Committer: Benedikt Ritter <be...@gmail.com>
Committed: Sun Jun 12 13:51:29 2016 +0200
----------------------------------------------------------------------
src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/d7423f08/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java b/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
index e39ac3f..3e32fee 100644
--- a/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
@@ -73,7 +73,7 @@ public class ReflectionUtils {
Constructor<T> ctor = null;
if (args.length == 0) {
- ctor = klass.getDeclaredConstructor(new Class[] {});
+ ctor = klass.getDeclaredConstructor();
} else {
Class<?>[] argClses = new Class[args.length];
for (int i = 0; i < args.length; i++) {
[2/2] commons-crypto git commit: Remove unnecessary assignment to
null. Also makes sure we're not accedentially returning null.
Posted by br...@apache.org.
Remove unnecessary assignment to null. Also makes sure we're not accedentially returning null.
Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/305b8260
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/305b8260
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/305b8260
Branch: refs/heads/master
Commit: 305b8260880a64ed3667433c996da996ef713e4c
Parents: d7423f0
Author: Benedikt Ritter <be...@gmail.com>
Authored: Sun Jun 12 13:52:05 2016 +0200
Committer: Benedikt Ritter <be...@gmail.com>
Committed: Sun Jun 12 13:52:05 2016 +0200
----------------------------------------------------------------------
src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/305b8260/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java b/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
index 3e32fee..88d292a 100644
--- a/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
@@ -70,7 +70,7 @@ public class ReflectionUtils {
*/
public static <T> T newInstance(Class<T> klass, Object... args) {
try {
- Constructor<T> ctor = null;
+ Constructor<T> ctor;
if (args.length == 0) {
ctor = klass.getDeclaredConstructor();