mcconnell    2004/04/06 00:42:48

  Modified:    util/extension/api/src/java/org/apache/avalon/extension
                        Extension.java Specification.java
  Log:
  Update code so that we don't throw an exception in response to an bad version 
spec.  This is because maven is automatically generating version specs that are 
potentially incompatible with the sub-spec (i.e. not necessarily a Dewey 
decimal).  If a bad spec occurs - the specification is now simply ignored and 
treated as is no spec declaration was made.
  
  Revision  Changes    Path
  1.3       +10 -4     
avalon/util/extension/api/src/java/org/apache/avalon/extension/Extension.java
  
  Index: Extension.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/util/extension/api/src/java/org/apache/avalon/extension/Extension.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Extension.java    24 Feb 2004 22:39:31 -0000      1.2
  +++ Extension.java    6 Apr 2004 07:42:48 -0000       1.3
  @@ -406,9 +406,15 @@
               }
               catch( final NumberFormatException nfe )
               {
  -                final String error = "Bad specification version format '" + 
specificationVersion +
  -                    "' in '" + extensionName + "'. (Reason: " + nfe + ")";
  -                throw new IllegalArgumentException( error );
  +                //
  +                // don't complain because maven is generating illegal 
  +                // spec values by default - instead we leave it as null
  +                //
  +
  +                //final String error = 
  +                //    "Bad specification version format '" + 
specificationVersion +
  +                //    "' in '" + extensionName + "'. (Reason: " + nfe + ")";
  +                //throw new IllegalArgumentException( error );
               }
           }
   
  
  
  
  1.3       +11 -4     
avalon/util/extension/api/src/java/org/apache/avalon/extension/Specification.java
  
  Index: Specification.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/util/extension/api/src/java/org/apache/avalon/extension/Specification.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Specification.java        24 Feb 2004 22:39:31 -0000      1.2
  +++ Specification.java        6 Apr 2004 07:42:48 -0000       1.3
  @@ -242,9 +242,16 @@
               }
               catch( final NumberFormatException nfe )
               {
  -                final String error = "Bad specification version format '" + 
specificationVersion +
  -                    "' in '" + specificationTitle + "'. (Reason: " + nfe + 
")";
  -                throw new IllegalArgumentException( error );
  +                //
  +                // don't complain because maven is generating illegal 
  +                // spec values by default - instead we leave it as null
  +                //
  +
  +                //
  +                //final String error = 
  +                //  "Bad specification version format '" + 
specificationVersion +
  +                //    "' in '" + specificationTitle + "'. (Reason: " + nfe + 
")";
  +                //throw new IllegalArgumentException( error );
               }
           }
   
  
  
  

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

Reply via email to