[MRM-1435] fix up useless boxing issues

Submitted by: Dave Brosius


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1039994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-11-29 00:39:43 +00:00
parent b5255589cf
commit 30f0ab2365
5 changed files with 16 additions and 16 deletions

View File

@ -145,7 +145,7 @@ public class LegacyToDefaultConverter
if ( matcher.matches() )
{
Snapshot snapshot = new Snapshot();
snapshot.setBuildNumber( Integer.valueOf( matcher.group( 3 ) ).intValue() );
snapshot.setBuildNumber( Integer.parseInt( matcher.group( 3 ) ) );
snapshot.setTimestamp( matcher.group( 2 ) );
versioning.setSnapshot( snapshot );
}
@ -520,7 +520,7 @@ public class LegacyToDefaultConverter
if ( metadata.getVersioning() != null && metadata.getVersioning().getSnapshot() != null )
{
Snapshot snapshot = metadata.getVersioning().getSnapshot();
int build = Integer.valueOf( matcher.group( 3 ) ).intValue();
int build = Integer.parseInt( matcher.group( 3 ) );
String ts = matcher.group( 2 );
if ( build == snapshot.getBuildNumber() && ts.equals( snapshot.getTimestamp() ) )
{

View File

@ -196,7 +196,7 @@ public class Maven2RepositoryPathTranslator
String timestamp = m.group( 1 );
String buildNumber = m.group( 2 );
facet.setTimestamp( timestamp );
facet.setBuildNumber( Integer.valueOf( buildNumber ) );
facet.setBuildNumber( Integer.parseInt( buildNumber ) );
version = idSubStrFromVersion.substring( 0, mainVersionLength ) + timestamp + "-" + buildNumber;
}
catch ( IllegalStateException e )

View File

@ -115,7 +115,7 @@ public class MavenArtifactFacet
String buildNumber = properties.get( "buildNumber" );
if ( buildNumber != null )
{
this.buildNumber = Integer.valueOf( buildNumber );
this.buildNumber = Integer.parseInt( buildNumber );
}
}
}

View File

@ -255,7 +255,7 @@ public class FileMetadataRepository
File directory = new File( getDirectory( repoId ), namespace + "/" + projectId + "/" + projectVersion );
Properties properties = readOrCreateProperties( directory, PROJECT_VERSION_METADATA_KEY );
int i = Integer.valueOf( properties.getProperty( "ref:lastReferenceNum", "-1" ) ) + 1;
int i = Integer.parseInt( properties.getProperty( "ref:lastReferenceNum", "-1" ) ) + 1;
setProperty( properties, "ref:lastReferenceNum", Integer.toString( i ) );
setProperty( properties, "ref:reference." + i + ".namespace", reference.getNamespace() );
setProperty( properties, "ref:reference." + i + ".projectId", reference.getProjectId() );
@ -470,7 +470,7 @@ public class FileMetadataRepository
String value = (String) entry.getValue();
if ( "updated".equals( field ) )
{
artifact.setFileLastModified( Long.valueOf( value ) );
artifact.setFileLastModified( Long.parseLong( value ) );
}
else if ( "size".equals( field ) )
{
@ -478,7 +478,7 @@ public class FileMetadataRepository
}
else if ( "whenGathered".equals( field ) )
{
artifact.setWhenGathered( new Date( Long.valueOf( value ) ) );
artifact.setWhenGathered( new Date( Long.parseLong( value ) ) );
}
else if ( "version".equals( field ) )
{
@ -937,7 +937,7 @@ public class FileMetadataRepository
File directory = new File( getDirectory( repoId ), namespace + "/" + projectId + "/" + projectVersion );
Properties properties = readOrCreateProperties( directory, PROJECT_VERSION_METADATA_KEY );
int numberOfRefs = Integer.valueOf( properties.getProperty( "ref:lastReferenceNum", "-1" ) ) + 1;
int numberOfRefs = Integer.parseInt( properties.getProperty( "ref:lastReferenceNum", "-1" ) ) + 1;
List<ProjectVersionReference> references = new ArrayList<ProjectVersionReference>();
for ( int i = 0; i < numberOfRefs; i++ )

View File

@ -176,14 +176,14 @@ public class RepositoryStatistics
public void fromProperties( Map<String, String> properties )
{
scanEndTime = new Date( Long.valueOf( properties.get( "scanEndTime" ) ) );
scanStartTime = new Date( Long.valueOf( properties.get( "scanStartTime" ) ) );
totalArtifactCount = Long.valueOf( properties.get( "totalArtifactCount" ) );
totalArtifactFileSize = Long.valueOf( properties.get( "totalArtifactFileSize" ) );
totalFileCount = Long.valueOf( properties.get( "totalFileCount" ) );
totalGroupCount = Long.valueOf( properties.get( "totalGroupCount" ) );
totalProjectCount = Long.valueOf( properties.get( "totalProjectCount" ) );
newFileCount = Long.valueOf( properties.get( "newFileCount" ) );
scanEndTime = new Date( Long.parseLong( properties.get( "scanEndTime" ) ) );
scanStartTime = new Date( Long.parseLong( properties.get( "scanStartTime" ) ) );
totalArtifactCount = Long.parseLong( properties.get( "totalArtifactCount" ) );
totalArtifactFileSize = Long.parseLong( properties.get( "totalArtifactFileSize" ) );
totalFileCount = Long.parseLong( properties.get( "totalFileCount" ) );
totalGroupCount = Long.parseLong( properties.get( "totalGroupCount" ) );
totalProjectCount = Long.parseLong( properties.get( "totalProjectCount" ) );
newFileCount = Long.parseLong( properties.get( "newFileCount" ) );
totalCountForType.clear();
for ( Map.Entry<String, String> entry : properties.entrySet() )
{