Code cleanup - Maven requires Java 5+ : Remove unnecessary unboxing

This commit is contained in:
Arnaud Héritier 2013-06-11 21:47:18 +02:00
parent 96db1abbe9
commit a2897f86b3
6 changed files with 10 additions and 10 deletions

View File

@ -69,7 +69,7 @@ public void transferProgressed( TransferEvent event )
for ( Map.Entry<TransferResource, Long> entry : downloads.entrySet() ) for ( Map.Entry<TransferResource, Long> entry : downloads.entrySet() )
{ {
long total = entry.getKey().getContentLength(); long total = entry.getKey().getContentLength();
long complete = entry.getValue().longValue(); long complete = entry.getValue();
buffer.append( getStatus( complete, total ) ).append( " " ); buffer.append( getStatus( complete, total ) ).append( " " );
} }

View File

@ -101,7 +101,7 @@ public class DefaultArtifactResolver
public DefaultArtifactResolver() public DefaultArtifactResolver()
{ {
int threads = Integer.getInteger( "maven.artifact.threads", 5 ).intValue(); int threads = Integer.getInteger( "maven.artifact.threads", 5 );
if ( threads <= 1 ) if ( threads <= 1 )
{ {
executor = new Executor() executor = new Executor()

View File

@ -75,7 +75,7 @@ public static void mergePluginLists( PluginContainer childContainer, PluginConta
String inherited = plugin.getInherited(); String inherited = plugin.getInherited();
if ( ( inherited != null ) && !Boolean.valueOf( inherited ).booleanValue() ) if ( ( inherited != null ) && !Boolean.valueOf( inherited ) )
{ {
it.remove(); it.remove();
} }
@ -96,7 +96,7 @@ public static void mergePluginLists( PluginContainer childContainer, PluginConta
// 2. the parent's <inherited/> flag is not set // 2. the parent's <inherited/> flag is not set
// 3. the parent's <inherited/> flag is set to true // 3. the parent's <inherited/> flag is set to true
if ( !handleAsInheritance || ( parentInherited == null ) if ( !handleAsInheritance || ( parentInherited == null )
|| Boolean.valueOf( parentInherited ).booleanValue() ) || Boolean.valueOf( parentInherited ) )
{ {
Plugin childPlugin = (Plugin) childPlugins.get( parentPlugin.getKey() ); Plugin childPlugin = (Plugin) childPlugins.get( parentPlugin.getKey() );
@ -216,7 +216,7 @@ public static void mergePluginDefinitions( Plugin child, Plugin parent, boolean
// from here to the end of the method is dealing with merging of the <executions/> section. // from here to the end of the method is dealing with merging of the <executions/> section.
String parentInherited = parent.getInherited(); String parentInherited = parent.getInherited();
boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited ).booleanValue(); boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited );
List<PluginExecution> parentExecutions = parent.getExecutions(); List<PluginExecution> parentExecutions = parent.getExecutions();
@ -233,7 +233,7 @@ public static void mergePluginDefinitions( Plugin child, Plugin parent, boolean
String inherited = parentExecution.getInherited(); String inherited = parentExecution.getInherited();
boolean parentExecInherited = boolean parentExecInherited =
parentIsInherited && ( ( inherited == null ) || Boolean.valueOf( inherited ).booleanValue() ); parentIsInherited && ( ( inherited == null ) || Boolean.valueOf( inherited ) );
if ( !handleAsInheritance || parentExecInherited ) if ( !handleAsInheritance || parentExecInherited )
{ {

View File

@ -389,7 +389,7 @@ private static void mergeReportPluginLists( Reporting child, Reporting parent, b
String parentInherited = parentPlugin.getInherited(); String parentInherited = parentPlugin.getInherited();
if ( !handleAsInheritance || ( parentInherited == null ) if ( !handleAsInheritance || ( parentInherited == null )
|| Boolean.valueOf( parentInherited ).booleanValue() ) || Boolean.valueOf( parentInherited ) )
{ {
ReportPlugin assembledPlugin = parentPlugin; ReportPlugin assembledPlugin = parentPlugin;
@ -481,7 +481,7 @@ public static void mergeReportPluginDefinitions( ReportPlugin child, ReportPlugi
// from here to the end of the method is dealing with merging of the <executions/> section. // from here to the end of the method is dealing with merging of the <executions/> section.
String parentInherited = parent.getInherited(); String parentInherited = parent.getInherited();
boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited ).booleanValue(); boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited );
List parentReportSets = parent.getReportSets(); List parentReportSets = parent.getReportSets();

View File

@ -74,7 +74,7 @@ public void transferCompleted( TransferEvent transferEvent )
} }
if ( transferred != null ) if ( transferred != null )
{ {
event.setTransferredBytes( transferred.longValue() ); event.setTransferredBytes( transferred );
} }
synchronized ( artifacts ) synchronized ( artifacts )

View File

@ -87,7 +87,7 @@ static String createMavenVersionString( Properties buildProperties )
if ( timestamp != null ) if ( timestamp != null )
{ {
SimpleDateFormat fmt = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ssZ" ); SimpleDateFormat fmt = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ssZ" );
String ts = fmt.format( new Date( Long.valueOf( timestamp ).longValue() ) ); String ts = fmt.format( new Date( Long.valueOf( timestamp ) ) );
msg += ( rev != null ? "; " : "" ) + ts; msg += ( rev != null ? "; " : "" ) + ts;
} }
msg += ")"; msg += ")";