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/aut/manifest Attribute.java
Date Sat, 09 Feb 2002 22:49:56 GMT
donaldp     02/02/09 14:49:56

  Modified:    proposal/myrmidon/src/java/org/apache/aut/vfs/provider
                        UriParser.java DefaultFileContent.java
                        AbstractFileSystemProvider.java
                        AbstractFileObject.java
               proposal/myrmidon/src/java/org/apache/aut/vfs NameScope.java
               proposal/myrmidon/src/java/org/apache/aut/vfs/impl
                        DefaultFileSystemManager.java
               proposal/myrmidon/src/java/org/apache/aut/manifest
                        Attribute.java
  Log:
  Fix up audit violations
  
  Revision  Changes    Path
  1.3       +9 -6      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/UriParser.java
  
  Index: UriParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/UriParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UriParser.java	6 Feb 2002 13:33:41 -0000	1.2
  +++ UriParser.java	9 Feb 2002 22:49:55 -0000	1.3
  @@ -20,8 +20,8 @@
    */
   public class UriParser
   {
  -    private static final Resources REZ
  -        = ResourceManager.getPackageResources( UriParser.class );
  +    private final static Resources REZ =
  +        ResourceManager.getPackageResources( UriParser.class );
   
       /** The normalised separator to use. */
       private char m_separatorChar;
  @@ -495,16 +495,19 @@
                   maxlen = path.length();
                   continue;
               }
  -            if( elemLen == 2
  -                && path.charAt( startElem ) == '.'
  -                && path.charAt( startElem + 1 ) == '.' )
  +            if( elemLen == 2 &&
  +                path.charAt( startElem ) == '.' &&
  +                path.charAt( startElem + 1 ) == '.' )
               {
                   // A '..' element - remove the previous element
                   if( startElem > startFirstElem )
                   {
                       int pos = startElem - 2;
  -                    for( ; path.charAt( pos ) != m_separatorChar; pos-- )
  +                    char ch = path.charAt( pos );
  +                    while( ch != m_separatorChar )
                       {
  +                        pos--;
  +                        ch = path.charAt( pos );
                       }
                       startElem = pos + 1;
                   }
  
  
  
  1.3       +10 -8     jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java
  
  Index: DefaultFileContent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultFileContent.java	6 Feb 2002 07:28:41 -0000	1.2
  +++ DefaultFileContent.java	9 Feb 2002 22:49:55 -0000	1.3
  @@ -23,20 +23,21 @@
    *
    * @author Adam Murdoch
    */
  -public class DefaultFileContent implements FileContent
  +public class DefaultFileContent
  +    implements FileContent
   {
  -    private static final Resources REZ
  -        = ResourceManager.getPackageResources( DefaultFileContent.class );
  +    private final static Resources REZ =
  +        ResourceManager.getPackageResources( DefaultFileContent.class );
  +
  +    private final static int STATE_NONE = 0;
  +    private final static int STATE_READING = 1;
  +    private final static int STATE_WRITING = 2;
   
       private AbstractFileObject m_file;
       private int _state = STATE_NONE;
       private FileContentInputStream m_instr;
       private FileContentOutputStream m_outstr;
   
  -    private static final int STATE_NONE = 0;
  -    private static final int STATE_READING = 1;
  -    private static final int STATE_WRITING = 2;
  -
       public DefaultFileContent( AbstractFileObject file )
       {
           m_file = file;
  @@ -332,7 +333,8 @@
       /**
        * An output stream for writing content.
        */
  -    private final class FileContentOutputStream extends BufferedOutputStream
  +    private final class FileContentOutputStream
  +        extends BufferedOutputStream
       {
           FileContentOutputStream( OutputStream outstr )
           {
  
  
  
  1.3       +3 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileSystemProvider.java
  
  Index: AbstractFileSystemProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileSystemProvider.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractFileSystemProvider.java	6 Feb 2002 13:33:41 -0000	1.2
  +++ AbstractFileSystemProvider.java	9 Feb 2002 22:49:55 -0000	1.3
  @@ -17,9 +17,10 @@
    *
    * @author Adam Murdoch
    */
  -public abstract class AbstractFileSystemProvider implements FileSystemProvider
  +public abstract class AbstractFileSystemProvider
  +    implements FileSystemProvider
   {
  -    private static final Resources REZ
  +    private final static Resources REZ
           = ResourceManager.getPackageResources( AbstractFileSystemProvider.class );
   
       protected FileSystemProviderContext m_context;
  
  
  
  1.4       +5 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java
  
  Index: AbstractFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractFileObject.java	6 Feb 2002 13:33:41 -0000	1.3
  +++ AbstractFileObject.java	9 Feb 2002 22:49:55 -0000	1.4
  @@ -27,16 +27,18 @@
    *
    * @author Adam Murdoch
    */
  -public abstract class AbstractFileObject implements FileObject
  +public abstract class AbstractFileObject
  +    implements FileObject
   {
  -    private static final Resources REZ =
  +    private final static Resources REZ =
           ResourceManager.getPackageResources( AbstractFileObject.class );
   
  +    private final static FileObject[] EMPTY_FILE_ARRAY = {};
  +
       private FileName m_name;
       private AbstractFileSystem m_fs;
       private DefaultFileContent m_content;
   
  -    private static final FileObject[] EMPTY_FILE_ARRAY = {};
   
       // Cached info
       private boolean m_attached;
  
  
  
  1.3       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/NameScope.java
  
  Index: NameScope.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/NameScope.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NameScope.java	9 Feb 2002 03:21:36 -0000	1.2
  +++ NameScope.java	9 Feb 2002 22:49:56 -0000	1.3
  @@ -22,7 +22,7 @@
        * not be empty, or <code>.</code>, or <code>..</code>, or
contain any
        * separator characters.
        */
  -    public static final NameScope CHILD = new NameScope( "child" );
  +    public final static NameScope CHILD = new NameScope( "child" );
   
       /**
        * Resolve against files in the same file system as the base file.
  @@ -39,7 +39,7 @@
        * <p>A path is considered absolute if it starts with a separator character,
        * and relative if it does not.
        */
  -    public static final NameScope FILE_SYSTEM = new NameScope( "filesystem" );
  +    public final static NameScope FILE_SYSTEM = new NameScope( "filesystem" );
   
       private String m_name;
   
  
  
  
  1.3       +7 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java
  
  Index: DefaultFileSystemManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultFileSystemManager.java	6 Feb 2002 13:34:07 -0000	1.2
  +++ DefaultFileSystemManager.java	9 Feb 2002 22:49:56 -0000	1.3
  @@ -27,9 +27,10 @@
    *
    * @author Adam Murdoch
    */
  -public class DefaultFileSystemManager implements FileSystemManager
  +public class DefaultFileSystemManager
  +    implements FileSystemManager
   {
  -    private static final Resources REZ
  +    private final static Resources REZ
           = ResourceManager.getPackageResources( DefaultFileSystemManager.class );
   
       /** The default provider. */
  @@ -90,7 +91,8 @@
        * Creates a provider instance, returns null if the provider class is
        * not found.
        */
  -    private FileSystemProvider createProvider( final String className ) throws Exception
  +    private FileSystemProvider createProvider( final String className )
  +        throws Exception
       {
           try
           {
  @@ -186,7 +188,8 @@
       /**
        * A provider context implementation.
        */
  -    private final class ProviderContextImpl implements FileSystemProviderContext
  +    private final class ProviderContextImpl
  +        implements FileSystemProviderContext
       {
           /**
            * Locates a cached file system by root URI.
  
  
  
  1.2       +1 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/manifest/Attribute.java
  
  Index: Attribute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/manifest/Attribute.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Attribute.java	9 Feb 2002 05:51:20 -0000	1.1
  +++ Attribute.java	9 Feb 2002 22:49:56 -0000	1.2
  @@ -7,17 +7,13 @@
    */
   package org.apache.aut.manifest;
   
  -import java.io.PrintWriter;
  -import java.io.IOException;
  -import java.util.jar.Attributes;
  -
   /**
    * Class to hold manifest attributes
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:conor@apache.org">Conor MacNeill</a>
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.1 $ $Date: 2002/02/09 05:51:20 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/09 22:49:56 $
    */
   public class Attribute
   {
  
  
  

--
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