diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java index 60a183c499..380a6078c3 100644 --- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java +++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java @@ -248,7 +248,7 @@ public class DefaultArtifactDescriptorReader } List 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 ); diff --git a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java index f5e8580999..1b77d4da82 100644 --- a/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java +++ b/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java @@ -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 ); diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java index da1f84a3cf..68f282b902 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java @@ -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() ) diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java index eb6e8950c0..d6836cbeb0 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java @@ -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 ); } diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java index 927027c7f0..43ba71dd41 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java @@ -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 ); } diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index 2d7f9a9b01..aaddef0acb 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -335,7 +335,7 @@ public class DefaultMaven Map configProps = new LinkedHashMap(); 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() ); diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java index 744d231d06..a5abc2989e 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java @@ -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() ) diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java index f5f4abc8fd..bfc84c03bb 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java @@ -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 ); diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index 0d264cf09a..09718eccfd 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -444,7 +444,7 @@ public class DefaultModelBuilder InputSource source = request.isLocationTracking() ? new InputSource() : null; Map options = new HashMap(); - 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 ); diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java index 568bbcb2a0..0c35033bbe 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java @@ -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 );