You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/06/30 08:41:25 UTC
cvs commit: avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info DependencyDescriptor.java Descriptor.java ServiceDescriptor.java
mcconnell 2003/06/29 23:41:25
Modified: merlin/meta-spi/src/java/org/apache/avalon/meta/info
DependencyDescriptor.java Descriptor.java
ServiceDescriptor.java
Log:
Minor updates together with patch from liu jie cn_liujie@yahoo.com.cn on duplicate test inside equality test.
Revision Changes Path
1.4 +1 -6 avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/DependencyDescriptor.java
Index: DependencyDescriptor.java
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/DependencyDescriptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DependencyDescriptor.java 16 Apr 2003 14:15:00 -0000 1.3
+++ DependencyDescriptor.java 30 Jun 2003 06:41:25 -0000 1.4
@@ -239,11 +239,6 @@
{
return false;
}
- if( !dep.getReference().equals( getReference() ) )
- {
- return false;
- }
-
return super.equals( dep );
}
return false;
1.2 +12 -1 avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/Descriptor.java
Index: Descriptor.java
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/Descriptor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Descriptor.java 13 Mar 2003 01:06:13 -0000 1.1
+++ Descriptor.java 30 Jun 2003 06:41:25 -0000 1.2
@@ -148,6 +148,17 @@
return false;
}
+ /**
+ * Returns the property set.
+ *
+ * @return the dproperty set.
+ */
+ protected Properties getProperties()
+ {
+ return m_attributes;
+ }
+
+
private boolean compare( Descriptor primary, Descriptor secondary )
{
if( primary.getAttributeNames().length != secondary.getAttributeNames().length )
1.2 +16 -2 avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/ServiceDescriptor.java
Index: ServiceDescriptor.java
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/ServiceDescriptor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServiceDescriptor.java 13 Mar 2003 01:06:20 -0000 1.1
+++ ServiceDescriptor.java 30 Jun 2003 06:41:25 -0000 1.2
@@ -73,13 +73,27 @@
* @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
* @version $Revision$ $Date$
*/
-public final class ServiceDescriptor
+public class ServiceDescriptor
extends Descriptor
{
/**
* The service reference that descriptor is describing.
*/
private final ReferenceDescriptor m_designator;
+
+ /**
+ * Construct a service descriptor.
+ *
+ * @param descriptor the service descriptor
+ * @exception NullPointerException if the descriptor argument is null
+ */
+ public ServiceDescriptor( final ServiceDescriptor descriptor )
+ throws NullPointerException
+ {
+ super( descriptor.getProperties() );
+ m_designator = descriptor.getReference();
+ }
+
/**
* Construct a service descriptor for specified ReferenceDescriptor
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org