donaldp 2002/06/12 21:21:29
Modified: extension/src/java/org/apache/avalon/excalibur/extension
Extension.java
Log:
Made Extension accept specification version entrys that are not in
DeweyDecimal format as most manifests out there are non-compliant.
Submitted By: Vinay Chandran
Revision Changes Path
1.21 +6 -29
jakarta-avalon-excalibur/extension/src/java/org/apache/avalon/excalibur/extension/Extension.java
Index: Extension.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/extension/src/java/org/apache/avalon/excalibur/extension/Extension.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Extension.java 13 May 2002 12:17:38 -0000 1.20
+++ Extension.java 13 Jun 2002 04:21:29 -0000 1.21
@@ -167,7 +167,7 @@
* The version number (dotted decimal notation) for this implementation
* of the optional package.
*/
- private DeweyDecimal m_implementationVersion;
+ private String m_implementationVersion;
/**
* The URL from which the most recent version of this optional package
@@ -350,7 +350,7 @@
implementationVendor );
}
- final DeweyDecimal implementationVersion =
extension.getImplementationVersion();
+ final String implementationVersion =
extension.getImplementationVersion();
if( null != implementationVersion )
{
attributes.putValue( prefix + IMPLEMENTATION_VERSION,
@@ -406,21 +406,8 @@
m_implementationURL = implementationURL;
m_implementationVendor = implementationVendor;
m_implementationVendorID = implementationVendorId;
-
- if( null != implementationVersion )
- {
- try
- {
- m_implementationVersion = new DeweyDecimal(
implementationVersion );
- }
- catch( final NumberFormatException nfe )
- {
- final String error = "Bad implementation version format '" +
implementationVersion +
- "' in '" + extensionName + "'. (Reason: " + nfe + ")";
- throw new IllegalArgumentException( error );
- }
- }
-
+ m_implementationVersion=implementationVersion;
+
if( null == m_extensionName )
{
throw new NullPointerException( "extensionName property is null"
);
@@ -492,7 +479,7 @@
*
* @return the version of the extensions implementation.
*/
- public DeweyDecimal getImplementationVersion()
+ public String getImplementationVersion()
{
return m_implementationVersion;
}
@@ -535,16 +522,6 @@
}
}
- // Implementation version must be >= required
- final DeweyDecimal implementationVersion =
required.getImplementationVersion();
- if( null != implementationVersion )
- {
- if( null == m_implementationVersion ||
- !isCompatible( m_implementationVersion,
implementationVersion ) )
- {
- return REQUIRE_IMPLEMENTATION_UPGRADE;
- }
- }
// This available optional package satisfies the requirements
return COMPATIBLE;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>