archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: svn commit: r940163 - in /archiva/trunk/archiva-modules/archiva-web: archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/ archiva-webapp/src/main/java/org/apache/maven/...
Date Mon, 03 May 2010 06:22:49 GMT
Hi Deng,

On 02/05/2010, at 4:13 PM, oching@apache.org 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
brett@apache.org
http://brettporter.wordpress.com/





Mime
View raw message