commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: svn commit: r1449456 - in /commons/proper/beanutils/trunk/src: changes/changes.xml main/java/org/apache/commons/beanutils/ConstructorUtils.java test/java/org/apache/commons/beanutils/ConstructorUtilsTestCase.java
Date Sun, 24 Feb 2013 20:19:10 GMT
Hi there Bene,

> @@ -82,6 +82,9 @@ public class ConstructorUtils {
>              InstantiationException {
>
>          Object[] args = { arg };
> +        if (arg == null) {
> +            args = null;
> +        }
>          return invokeConstructor(klass, args);
>      }

I'd invert the logic to

        Object[] args = null;
        if (arg != null) {
            args = { arg };
        }
        return invokeConstructor(klass, args);

HTH,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message