avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: cvs commit: avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl DefaultFileRepository.java
Date Wed, 12 Nov 2003 06:24:23 GMT


akarasulu@apache.org wrote:

>  +     public URL getArtifact(
>  +       final String artifact, final String version, final String type )
>  +       throws RepositoryException
>  +     {
>  +         int n = artifact.indexOf( SEPERATOR ) ;
>  +         
>  +         if( n < 1 )
>  +         {
>  +             final String error = "Invalid artifact name: " + artifact ;
>  +             throw new RepositoryException( error ) ;
>  +         }
>  +         
>  +         final String group = artifact.substring( 0, n ) ;
>  +         final String name = artifact.substring( n + 1 ) ; 
>  +         return getArtifact( group, name, version, type ) ;
>  +     }
>

Just thinking - if n < 1, then assign the artifact value to both group 
and name.

Stephen.




-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message