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 );
}
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() ) )
{
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 )
String buildNumber = properties.get( "buildNumber" );
if ( buildNumber != null )
{
- this.buildNumber = Integer.valueOf( buildNumber );
+ this.buildNumber = Integer.parseInt( buildNumber );
}
}
}
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() );
String value = (String) entry.getValue();
if ( "updated".equals( field ) )
{
- artifact.setFileLastModified( Long.valueOf( value ) );
+ artifact.setFileLastModified( Long.parseLong( value ) );
}
else if ( "size".equals( field ) )
{
}
else if ( "whenGathered".equals( field ) )
{
- artifact.setWhenGathered( new Date( Long.valueOf( value ) ) );
+ artifact.setWhenGathered( new Date( Long.parseLong( value ) ) );
}
else if ( "version".equals( field ) )
{
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++ )
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() )
{