avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject cvs commit: avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl DefaultFileRepository.java
Date Wed, 12 Nov 2003 07:21:18 GMT
akarasulu    2003/11/11 23:21:17

  Modified:    repository/impl/src/java/org/apache/avalon/repository/impl
                        DefaultFileRepository.java
  Log:
  If the artifact parameter is not a group:name 
  value w/o a ':' then we presume 
  
  group=name=artifact
  
  Revision  Changes    Path
  1.9       +14 -13    avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFileRepository.java
  
  Index: DefaultFileRepository.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFileRepository.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultFileRepository.java	12 Nov 2003 06:59:16 -0000	1.8
  +++ DefaultFileRepository.java	12 Nov 2003 07:21:17 -0000	1.9
  @@ -231,26 +231,27 @@
        * Get a resource relative to the supplied artifact name where the artifact 
        * name is equivalent to the group and resource name seperated by a colon.
        *
  -     * @param artifact the artifact name
  -     * @param version the version identifier
  -     * @param type the resource type
  +     * @param a_artifact the artifact name
  +     * @param a_version the version identifier
  +     * @param a_type the resource type
        * @return the resource
        */
  -     public URL getArtifact(
  -       final String artifact, final String version, final String type )
  -       throws RepositoryException
  +     public URL getArtifact( final String a_artifact, final String a_version, 
  +                             final String a_type ) throws RepositoryException
        {
  -         int n = artifact.indexOf( SEPERATOR ) ;
  +         String l_group = null ;
  +         String l_name = null ; 
  +         int n = a_artifact.indexOf( SEPERATOR ) ;
            
            if( n < 1 )
            {
  -             final String error = "Invalid artifact name: " + artifact ;
  -             throw new RepositoryException( error ) ;
  +             l_group = a_artifact ;
  +             l_name = a_artifact ; 
            }
            
  -         final String group = artifact.substring( 0, n ) ;
  -         final String name = artifact.substring( n + 1 ) ; 
  -         return getArtifact( group, name, version, type ) ;
  +         l_group = a_artifact.substring( 0, n ) ;
  +         l_name = a_artifact.substring( n + 1 ) ; 
  +         return getArtifact( l_group, l_name, a_version, a_type ) ;
        }
       
        
  
  
  

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


Mime
View raw message