maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <apa...@sourcegrounds.com>
Subject Re: svn commit: r1229755 - /maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
Date Wed, 11 Jan 2012 19:35:19 GMT
Hi Simone,

simple answer: because the original code wasn't using the entryset. I only  
added generics, verifying I didn't introduce a potential NPE with new  
for-loops.
I haven't checked if the code could be optimized, but this looks like one.

-Robert

On Wed, 11 Jan 2012 08:57:17 +0100, Simone Tripodi  
<simonetripodi@apache.org> wrote:

> Hi Robert!
>
>> +            for ( String providerType :  
>> providerImplementations.keySet() )
>>             {
>> -                String providerType = (String) i.next();
>> -                String providerImplementation = (String)  
>> providerImplementations.get( providerType );
>> +                String providerImplementation =  
>> providerImplementations.get( providerType );
>
> why not just iterating over providerImplementations.entrySet() ?
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

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


Mime
View raw message