ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/vfile StringToFileObjectConverter.java
Date Thu, 21 Feb 2002 09:45:24 GMT
donaldp     02/02/21 01:45:24

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/vfile
                        StringToFileObjectConverter.java
  Log:
  Update to latest converter architecture
  
  Revision  Changes    Path
  1.2       +8 -6      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/vfile/StringToFileObjectConverter.java
  
  Index: StringToFileObjectConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/vfile/StringToFileObjectConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringToFileObjectConverter.java	21 Feb 2002 03:26:23 -0000	1.1
  +++ StringToFileObjectConverter.java	21 Feb 2002 09:45:24 -0000	1.2
  @@ -22,7 +22,8 @@
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    * @ant:converter source="java.lang.String" destination="org.apache.aut.vfs.FileObject"
    */
  -public class StringToFileObjectConverter extends AbstractConverter
  +public class StringToFileObjectConverter
  +    extends AbstractConverter
   {
       private final static Resources REZ =
           ResourceManager.getPackageResources( StringToFileObjectConverter.class );
  @@ -35,22 +36,23 @@
       /**
        * Converts a String into a FileObject.
        */
  -    protected Object convert( Object original, Context context )
  +    protected Object convert( final Object original, final Object context )
           throws ConverterException
       {
  -        final String fileUri = (String)original;
  +        final String uri = (String)original;
           final TaskContext taskContext = (TaskContext)context;
   
           try
           {
  -            final FileSystemManager manager = (FileSystemManager)taskContext.getService(
FileSystemManager.class );
  +            final FileSystemManager manager =
  +                (FileSystemManager)taskContext.getService( FileSystemManager.class );
   
               // TODO - change TaskContext.getBaseDirectory() to return a FileObject
  -            return manager.resolveFile( taskContext.getBaseDirectory(), fileUri );
  +            return manager.resolveFile( taskContext.getBaseDirectory(), uri );
           }
           catch( Exception e )
           {
  -            final String message = REZ.getString( "bad-convert-string-to-file.error", fileUri
);
  +            final String message = REZ.getString( "bad-convert-string-to-file.error", uri
);
               throw new ConverterException( message, e );
           }
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message