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 2013/06/11 21:47:16 UTC

svn commit: r1491924 - /commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java

Author: britter
Date: Tue Jun 11 19:47:16 2013
New Revision: 1491924

URL: http://svn.apache.org/r1491924
Log:
Use var args instead of array as parameter

Modified:
    commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java

Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java?rev=1491924&r1=1491923&r2=1491924&view=diff
==============================================================================
--- commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java (original)
+++ commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java Tue Jun 11 19:47:16 2013
@@ -69,7 +69,7 @@ public class ChainBase<K, V, C extends M
      *  or one of the individual {@link Command} elements,
      *  is <code>null</code>
      */
-    public ChainBase(Command<K, V, C>[] commands) {
+    public ChainBase(Command<K, V, C>... commands) {
         if (commands == null) {
             throw new IllegalArgumentException();
         }



Re: svn commit: r1491924 - /commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java

Posted by Benedikt Ritter <be...@gmail.com>.
Actually I don't know how the old actor (with the array param) was supposed to work. The compiler won't let you create a Command<K, V, C>[]...

Am 11.06.2013 um 22:00 schrieb Simone Tripodi <si...@apache.org>:

> I usually don't take too much care to this kind of warnings...
> 
> My opinion is you can feel free to keep the best option you like :P
> 
> best and thanks,
> -Simo
> 
> http://people.apache.org/~simonetripodi/
> http://twitter.com/simonetripodi
> 
> 
> On Tue, Jun 11, 2013 at 9:50 PM, Benedikt Ritter <be...@gmail.com> wrote:
>> This will cause warnings in client code, so better revert it?
>> 
>> Am 11.06.2013 um 21:47 schrieb britter@apache.org:
>> 
>>> Author: britter
>>> Date: Tue Jun 11 19:47:16 2013
>>> New Revision: 1491924
>>> 
>>> URL: http://svn.apache.org/r1491924
>>> Log:
>>> Use var args instead of array as parameter
>>> 
>>> Modified:
>>>   commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
>>> 
>>> Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
>>> URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java?rev=1491924&r1=1491923&r2=1491924&view=diff
>>> ==============================================================================
>>> --- commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java (original)
>>> +++ commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java Tue Jun 11 19:47:16 2013
>>> @@ -69,7 +69,7 @@ public class ChainBase<K, V, C extends M
>>>     *  or one of the individual {@link Command} elements,
>>>     *  is <code>null</code>
>>>     */
>>> -    public ChainBase(Command<K, V, C>[] commands) {
>>> +    public ChainBase(Command<K, V, C>... commands) {
>>>        if (commands == null) {
>>>            throw new IllegalArgumentException();
>>>        }
>>> 
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


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


Re: svn commit: r1491924 - /commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java

Posted by Simone Tripodi <si...@apache.org>.
I usually don't take too much care to this kind of warnings...

My opinion is you can feel free to keep the best option you like :P

best and thanks,
-Simo

http://people.apache.org/~simonetripodi/
http://twitter.com/simonetripodi


On Tue, Jun 11, 2013 at 9:50 PM, Benedikt Ritter <be...@gmail.com> wrote:
> This will cause warnings in client code, so better revert it?
>
> Am 11.06.2013 um 21:47 schrieb britter@apache.org:
>
>> Author: britter
>> Date: Tue Jun 11 19:47:16 2013
>> New Revision: 1491924
>>
>> URL: http://svn.apache.org/r1491924
>> Log:
>> Use var args instead of array as parameter
>>
>> Modified:
>>    commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
>>
>> Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
>> URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java?rev=1491924&r1=1491923&r2=1491924&view=diff
>> ==============================================================================
>> --- commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java (original)
>> +++ commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java Tue Jun 11 19:47:16 2013
>> @@ -69,7 +69,7 @@ public class ChainBase<K, V, C extends M
>>      *  or one of the individual {@link Command} elements,
>>      *  is <code>null</code>
>>      */
>> -    public ChainBase(Command<K, V, C>[] commands) {
>> +    public ChainBase(Command<K, V, C>... commands) {
>>         if (commands == null) {
>>             throw new IllegalArgumentException();
>>         }
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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


Re: svn commit: r1491924 - /commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java

Posted by Benedikt Ritter <be...@gmail.com>.
This will cause warnings in client code, so better revert it?

Am 11.06.2013 um 21:47 schrieb britter@apache.org:

> Author: britter
> Date: Tue Jun 11 19:47:16 2013
> New Revision: 1491924
> 
> URL: http://svn.apache.org/r1491924
> Log:
> Use var args instead of array as parameter
> 
> Modified:
>    commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
> 
> Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
> URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java?rev=1491924&r1=1491923&r2=1491924&view=diff
> ==============================================================================
> --- commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java (original)
> +++ commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ChainBase.java Tue Jun 11 19:47:16 2013
> @@ -69,7 +69,7 @@ public class ChainBase<K, V, C extends M
>      *  or one of the individual {@link Command} elements,
>      *  is <code>null</code>
>      */
> -    public ChainBase(Command<K, V, C>[] commands) {
> +    public ChainBase(Command<K, V, C>... commands) {
>         if (commands == null) {
>             throw new IllegalArgumentException();
>         }
> 
> 


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