dain 2004/01/21 22:38:21
Modified: modules/kernel/src/java/org/apache/geronimo/gbean
GBeanInfo.java
Log:
Allow the attribute, operation, endpoint and notification sets passed in
to the constructor to be null
Revision Changes Path
1.6 +23 -7
incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java
Index: GBeanInfo.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- GBeanInfo.java 22 Jan 2004 02:46:27 -0000 1.5
+++ GBeanInfo.java 22 Jan 2004 06:38:21 -0000 1.6
@@ -114,15 +114,31 @@
public GBeanInfo(String name, String className, Set attributes,
GConstructorInfo constructor, Set operations, Set endpoints, Set notifications)
{
this.name = name;
this.className = className;
- this.attributes = Collections.unmodifiableSet(new
HashSet(attributes));
- if (constructor != null) {
- this.constructor = constructor;
+ if(attributes == null) {
+ this.attributes = Collections.EMPTY_SET;
} else {
+ this.attributes = Collections.unmodifiableSet(new
HashSet(attributes));
+ }
+ if (constructor == null) {
this.constructor = new GConstructorInfo(Collections.EMPTY_LIST,
Collections.EMPTY_LIST);
+ } else {
+ this.constructor = constructor;
+ }
+ if(operations == null) {
+ this.operations = Collections.EMPTY_SET;
+ } else {
+ this.operations = Collections.unmodifiableSet(new
HashSet(operations));
+ }
+ if(endpoints == null) {
+ this.endpoints = Collections.EMPTY_SET;
+ } else {
+ this.endpoints = Collections.unmodifiableSet(new
HashSet(endpoints));
+ }
+ if (notifications == null) {
+ this.notifications = Collections.EMPTY_SET;
+ } else {
+ this.notifications = Collections.unmodifiableSet(new
HashSet(notifications));
}
- this.operations = Collections.unmodifiableSet(new
HashSet(operations));
- this.endpoints = Collections.unmodifiableSet(new HashSet(endpoints));
- this.notifications = Collections.unmodifiableSet(new
HashSet(notifications));
}
public String getName() {