mirror of https://github.com/apache/maven.git
Code cleanup - Maven requires Java 5+ : Remove unnecessary boxing
This commit is contained in:
parent
143216f93a
commit
96db1abbe9
|
@ -248,7 +248,7 @@ public class DefaultArtifactDescriptorReader
|
|||
}
|
||||
|
||||
List<License> licenses = model.getLicenses();
|
||||
properties.put( "license.count", Integer.valueOf( licenses.size() ) );
|
||||
properties.put( "license.count", licenses.size() );
|
||||
for ( int i = 0; i < licenses.size(); i++ )
|
||||
{
|
||||
License license = licenses.get( i );
|
||||
|
|
|
@ -62,7 +62,7 @@ public class ConsoleTransferListener
|
|||
public void transferProgressed( TransferEvent event )
|
||||
{
|
||||
TransferResource resource = event.getResource();
|
||||
downloads.put( resource, Long.valueOf( event.getTransferredBytes() ) );
|
||||
downloads.put( resource, event.getTransferredBytes() );
|
||||
|
||||
StringBuilder buffer = new StringBuilder( 64 );
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ public class StringSearchModelInterpolator
|
|||
{
|
||||
if ( !fieldIsPrimitiveByClass.containsKey( fieldType ) )
|
||||
{
|
||||
fieldIsPrimitiveByClass.put( fieldType, Boolean.valueOf( fieldType.isPrimitive() ) );
|
||||
fieldIsPrimitiveByClass.put( fieldType, fieldType.isPrimitive() );
|
||||
}
|
||||
|
||||
if ( fieldIsPrimitiveByClass.get( fieldType ).booleanValue() )
|
||||
|
|
|
@ -110,11 +110,11 @@ public class TransferListenerAdapter
|
|||
transferred = transfers.get( transferEvent.getResource() );
|
||||
if ( transferred == null )
|
||||
{
|
||||
transferred = Long.valueOf( length );
|
||||
transferred = (long) length;
|
||||
}
|
||||
else
|
||||
{
|
||||
transferred = Long.valueOf( transferred.longValue() + length );
|
||||
transferred = transferred.longValue() + length;
|
||||
}
|
||||
transfers.put( transferEvent.getResource(), transferred );
|
||||
}
|
||||
|
|
|
@ -123,12 +123,12 @@ public class ProjectInheritanceTest
|
|||
String testPluginArtifactId = "maven-compiler-plugin";
|
||||
|
||||
// this is the plugin we're looking for.
|
||||
validPluginCounts.put( testPluginArtifactId, new Integer( 0 ) );
|
||||
validPluginCounts.put( testPluginArtifactId, 0 );
|
||||
|
||||
// these are injected if -DperformRelease=true
|
||||
validPluginCounts.put( "maven-deploy-plugin", new Integer( 0 ) );
|
||||
validPluginCounts.put( "maven-javadoc-plugin", new Integer( 0 ) );
|
||||
validPluginCounts.put( "maven-source-plugin", new Integer( 0 ) );
|
||||
validPluginCounts.put( "maven-deploy-plugin", 0 );
|
||||
validPluginCounts.put( "maven-javadoc-plugin", 0 );
|
||||
validPluginCounts.put( "maven-source-plugin", 0 );
|
||||
|
||||
Plugin testPlugin = null;
|
||||
|
||||
|
@ -157,7 +157,7 @@ public class ProjectInheritanceTest
|
|||
}
|
||||
else
|
||||
{
|
||||
count = new Integer( count.intValue() + 1 );
|
||||
count = count.intValue() + 1;
|
||||
|
||||
validPluginCounts.put( pluginArtifactId, count );
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ public class DefaultMaven
|
|||
|
||||
Map<Object, Object> configProps = new LinkedHashMap<Object, Object>();
|
||||
configProps.put( ConfigurationProperties.USER_AGENT, getUserAgent() );
|
||||
configProps.put( ConfigurationProperties.INTERACTIVE, Boolean.valueOf( request.isInteractiveMode() ) );
|
||||
configProps.put( ConfigurationProperties.INTERACTIVE, request.isInteractiveMode() );
|
||||
configProps.putAll( request.getSystemProperties() );
|
||||
configProps.putAll( request.getUserProperties() );
|
||||
|
||||
|
|
|
@ -651,7 +651,7 @@ public class DefaultProjectBuilder
|
|||
Boolean profilesXml = profilesXmls.get( basedir );
|
||||
if ( profilesXml == null )
|
||||
{
|
||||
profilesXml = Boolean.valueOf( new File( basedir, "profiles.xml" ).exists() );
|
||||
profilesXml = new File( basedir, "profiles.xml" ).exists();
|
||||
profilesXmls.put( basedir, profilesXml );
|
||||
}
|
||||
if ( profilesXml.booleanValue() )
|
||||
|
|
|
@ -50,7 +50,7 @@ public class ConsoleMavenTransferListener
|
|||
throws TransferCancelledException
|
||||
{
|
||||
TransferResource resource = event.getResource();
|
||||
downloads.put( resource, Long.valueOf( event.getTransferredBytes() ) );
|
||||
downloads.put( resource, event.getTransferredBytes() );
|
||||
|
||||
StringBuilder buffer = new StringBuilder( 64 );
|
||||
|
||||
|
|
|
@ -444,7 +444,7 @@ public class DefaultModelBuilder
|
|||
InputSource source = request.isLocationTracking() ? new InputSource() : null;
|
||||
|
||||
Map<String, Object> options = new HashMap<String, Object>();
|
||||
options.put( ModelProcessor.IS_STRICT, Boolean.valueOf( strict ) );
|
||||
options.put( ModelProcessor.IS_STRICT, strict );
|
||||
options.put( ModelProcessor.INPUT_SOURCE, source );
|
||||
options.put( ModelProcessor.SOURCE, modelSource );
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ public class MavenModelMerger
|
|||
merged.addAll( tgt );
|
||||
for ( int i = 0, n = tgt.size(); i < n; i++ )
|
||||
{
|
||||
indices.add( Integer.valueOf( i ) );
|
||||
indices.add( i );
|
||||
}
|
||||
for ( int i = 0, n = src.size(); i < n; i++ )
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ public class MavenModelMerger
|
|||
if ( !excludes.contains( s ) )
|
||||
{
|
||||
merged.add( s );
|
||||
indices.add( Integer.valueOf( ~i ) );
|
||||
indices.add( ~i );
|
||||
}
|
||||
}
|
||||
target.setModules( merged );
|
||||
|
|
Loading…
Reference in New Issue