? patch.txt
Index: AbstractComponent.java
===================================================================
RCS file:
/home/cvspublic/incubator-geronimo/modules/core/src/java/org/apache/geronimo/common/AbstractComponent.java,v
retrieving revision 1.8
diff -u -r1.8 AbstractComponent.java
--- AbstractComponent.java 20 Aug 2003 07:13:25 -0000 1.8
+++ AbstractComponent.java 20 Aug 2003 20:10:58 -0000
@@ -60,7 +60,7 @@
* A helper implementation of the Component interface that should
* be used as a base class for Component implementations.
*
- * @todo this is broken because name is required but there is no way to set it
+ * @todo verify that the ObjectName defined in AbstractStateManageable can be
used as the Component's name
*
* @version $Revision: 1.8 $ $Date: 2003/08/20 07:13:25 $
*/
@@ -71,12 +71,6 @@
private Container container;
/**
- * the identity of this Component
- */
- private String name;
-
-
- /**
* The Container that this Component belongs to
*
* @return a <code>Container</code> value
@@ -129,7 +123,7 @@
* @return the name (formatted according to JSR 77)
*/
public String getObjectName() {
- return name;
+ return objectName.toString();
}
/**
@@ -141,7 +135,7 @@
public boolean equals(Object o) {
if (o instanceof Component) {
Component component = (Component)o;
- return component.getObjectName().equals(name);
+ return component.getObjectName().equals(getObjectName());
}
return false;
}
@@ -155,9 +149,9 @@
* @return hash of Component name
*/
public int hashCode() {
- if (name == null) {
+ if (getObjectName() == null) {
return 0;
}
- return name.hashCode();
+ return getObjectName().hashCode();
}
}
does not need to define its own identity, its already inherited.
- Re: [PATCH] AbstractComponent Bodo Wippermann
- Re: [PATCH] AbstractComponent Greg Wilkins
