Hi Deng,

On 02/05/2010, at 4:13 PM, [email protected] wrote:

> 
> 
> -            // explicitly update only if metadata-updater consumer is not 
> enabled!
> -            if ( 
> !config.getRepositoryScanning().getKnownContentConsumers().contains( 
> "metadata-updater" ) )
> +            // explicitly update only if versionMetadata-updater consumer is 
> not enabled!
> +            if ( 
> !config.getRepositoryScanning().getKnownContentConsumers().contains( 
> "versionMetadata-updater" ) )

Looks like your search/replace went rogue :)

> +        String projectPath = targetPath.substring( 0, 
> targetPath.lastIndexOf( File.separatorChar ) );
> +        File projectMetadataFile = getMetadata( projectPath );

I know that code was already there, but I think you could improve it's 
reliability with:
File projectDir = new File( targetPath ).getParentFile();
File projectMetadataFile = new File( projectDir, MAVEN_METADATA );

The "getMetadata" method looks small enough to be inlined.

Cheers,
Brett

--
Brett Porter
[email protected]
http://brettporter.wordpress.com/




Reply via email to