avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/extension Extension.java
Date Sat, 02 Feb 2002 13:12:34 GMT
donaldp     02/02/02 05:12:34

  Modified:    src/scratchpad/org/apache/avalon/excalibur/extension
                        Extension.java
  Log:
  Zapped spaces at EOL
  
  Revision  Changes    Path
  1.9       +23 -24    jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/extension/Extension.java
  
  Index: Extension.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/extension/Extension.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Extension.java	11 Dec 2001 09:53:34 -0000	1.8
  +++ Extension.java	2 Feb 2002 13:12:34 -0000	1.9
  @@ -12,7 +12,6 @@
   import java.util.List;
   import java.util.Map;
   import java.util.StringTokenizer;
  -import java.util.jar.Attributes.Name;
   import java.util.jar.Attributes;
   import java.util.jar.Manifest;
   import org.apache.avalon.excalibur.util.DeweyDecimal;
  @@ -30,19 +29,19 @@
    *
    * @author <a href="mailto:craigmcc@apache.org">Craig R. McClanahan</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.8 $ $Date: 2001/12/11 09:53:34 $
  + * @version $Revision: 1.9 $ $Date: 2002/02/02 13:12:34 $
    */
   public final class Extension
   {
  -    public static final Compatability COMPATIBLE = 
  +    public static final Compatability COMPATIBLE =
           new Compatability( "COMPATIBLE" );
  -    public static final Compatability REQUIRE_SPECIFICATION_UPGRADE = 
  +    public static final Compatability REQUIRE_SPECIFICATION_UPGRADE =
           new Compatability( "REQUIRE_SPECIFICATION_UPGRADE" );
  -    public static final Compatability REQUIRE_VENDOR_SWITCH = 
  +    public static final Compatability REQUIRE_VENDOR_SWITCH =
           new Compatability( "REQUIRE_VENDOR_SWITCH" );
  -    public static final Compatability REQUIRE_IMPLEMENTATION_UPGRADE = 
  +    public static final Compatability REQUIRE_IMPLEMENTATION_UPGRADE =
           new Compatability( "REQUIRE_IMPLEMENTATION_UPGRADE" );
  -    public static final Compatability INCOMPATIBLE = 
  +    public static final Compatability INCOMPATIBLE =
           new Compatability( "INCOMPATIBLE" );
   
       /**
  @@ -160,7 +159,7 @@
       private static void getRequired( final Attributes attributes,
                                        final ArrayList required )
       {
  -        final String names = attributes.getValue( Name.EXTENSION_LIST );
  +        final String names = attributes.getValue( Attributes.Name.EXTENSION_LIST );
           if( null == names ) return;
   
           final String[] extentions = StringUtil.split( names, " " );
  @@ -190,24 +189,24 @@
       private static Extension getExtension( final String prefix, final Attributes attributes
)
       {
           //WARNING: We trim the values of all the attributes because
  -        //Some extension declarations are badly defined (ie have spaces 
  +        //Some extension declarations are badly defined (ie have spaces
           //after version or vendorID)
  -        final String name = getTrimmedString( attributes.getValue( prefix + Name.EXTENSION_NAME
) );
  +        final String name = getTrimmedString( attributes.getValue( prefix + Attributes.Name.EXTENSION_NAME
) );
           if( null == name ) return null;
   
  -        final String specVendor = 
  -            getTrimmedString( attributes.getValue( prefix + Name.SPECIFICATION_VENDOR )
);
  -        final String specVersion = 
  -            getTrimmedString( attributes.getValue( prefix + Name.SPECIFICATION_VERSION
) );
  -
  -        final String impVersion = 
  -            getTrimmedString( attributes.getValue( prefix + Name.IMPLEMENTATION_VERSION
) );
  -        final String impVendor = 
  -            getTrimmedString( attributes.getValue( prefix + Name.IMPLEMENTATION_VENDOR
) );
  -        final String impVendorId = 
  -            getTrimmedString( attributes.getValue( prefix + Name.IMPLEMENTATION_VENDOR_ID
) );
  -        final String impURL = 
  -            getTrimmedString( attributes.getValue( prefix + Name.IMPLEMENTATION_URL ) );
  +        final String specVendor =
  +            getTrimmedString( attributes.getValue( prefix + Attributes.Name.SPECIFICATION_VENDOR
) );
  +        final String specVersion =
  +            getTrimmedString( attributes.getValue( prefix + Attributes.Name.SPECIFICATION_VERSION
) );
  +
  +        final String impVersion =
  +            getTrimmedString( attributes.getValue( prefix + Attributes.Name.IMPLEMENTATION_VERSION
) );
  +        final String impVendor =
  +            getTrimmedString( attributes.getValue( prefix + Attributes.Name.IMPLEMENTATION_VENDOR
) );
  +        final String impVendorId =
  +            getTrimmedString( attributes.getValue( prefix + Attributes.Name.IMPLEMENTATION_VENDOR_ID
) );
  +        final String impURL =
  +            getTrimmedString( attributes.getValue( prefix + Attributes.Name.IMPLEMENTATION_URL
) );
   
           return new Extension( name, specVersion, specVendor, impVersion,
                                 impVendor, impVendorId, impURL );
  @@ -254,7 +253,7 @@
               }
               catch( NumberFormatException nfe )
               {
  -                final String error = "Bad specification version format '" + specificationVersion
+ 
  +                final String error = "Bad specification version format '" + specificationVersion
+
                       "' in '" + extensionName + "'. (Reason: " + nfe + ")";
                   throw new IllegalArgumentException( error );
               }
  
  
  

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


Mime
View raw message