brett       2004/04/13 17:58:26

  Modified:    src/java/org/apache/maven/jelly Tag: MAVEN-1_0-BRANCH
                        MavenJellyContext.java
  Log:
  PR: MAVEN-1205
  add back method, removed unused invalid and improperly named method
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.35.4.6  +27 -10    maven/src/java/org/apache/maven/jelly/MavenJellyContext.java
  
  Index: MavenJellyContext.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/MavenJellyContext.java,v
  retrieving revision 1.35.4.5
  retrieving revision 1.35.4.6
  diff -u -r1.35.4.5 -r1.35.4.6
  --- MavenJellyContext.java    2 Apr 2004 23:43:09 -0000       1.35.4.5
  +++ MavenJellyContext.java    14 Apr 2004 00:58:26 -0000      1.35.4.6
  @@ -246,15 +246,10 @@
           return (MavenSession) getVariable( MavenConstants.SESSION );
       }
   
  -    /**
  -     * Add a remote repository to the list of remote repositories.
  -     *
  -     * @param mavenRemoteRepo Remote repository to add.
  -     */
  -    public void addMavenRemoteRepo( String mavenRemoteRepo )
  +    public void setMavenRepoRemotes( List mavenRepoRemote )
       {
  -        ( (List) getVariable( MavenConstants.REPO_REMOTE ) ).add( mavenRemoteRepo );
  -    }
  +        setVariable( MavenConstants.REPO_REMOTE, convertListToCsvString( 
mavenRepoRemote ) );
  +    } 
   
       /**
        * Get the mavenRepoRemote attribute.
  @@ -268,7 +263,7 @@
       }
   
       /**
  -     * Convert a CSV list of values into a List
  +     * Convert a CSV list of values into a List.
        *
        * @param csvString CVS list of values.
        * @return The List of value.
  @@ -284,6 +279,28 @@
           }
   
           return list;
  +    }
  +
  +    /**
  +     * Convert a List into a CSV list of values.
  +     *
  +     * @param list list of values.
  +     * @return The CVS string
  +     */
  +    private String convertListToCsvString( List list )
  +    {
  +        StringBuffer buf = new StringBuffer();
  +
  +        for ( int i = 0; i < list.size(); i++ )
  +        {
  +            if ( i > 0 )
  +            {
  +                buf.append( "," );
  +            }
  +            buf.append( list.get( i ) );
  +        }
  +
  +        return buf.toString();
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to