summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/BindingProperty.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/BindingProperty.java b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/BindingProperty.java
index c195a16ce5..d06170a70d 100644
--- a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/BindingProperty.java
+++ b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/BindingProperty.java
@@ -20,11 +20,11 @@
package org.apache.tuscany.sca.binding.jms;
public class BindingProperty {
-
+
private String name;
private String type;
private Object value;
-
+
public BindingProperty(String name, String type, Object value) {
this.name = name;
this.type = type;
@@ -38,34 +38,35 @@ public class BindingProperty {
public String getType() {
return type;
}
-
+
public Object getValue() {
return value;
}
-
+
@Override
- public boolean equals( Object object ) {
- return ( object instanceof BindingProperty ) && equals( (BindingProperty) object );
+ public boolean equals(Object object) {
+ return (object instanceof BindingProperty) && equals((BindingProperty)object);
}
/**
* Test whether this and another Binding Property are equal.
+ *
* @param property
* @return true if all fields of property match.
*/
- public boolean equals( BindingProperty property ) {
- if ( name == null && property.getName() != null )
+ public boolean equals(BindingProperty property) {
+ if (name == null && property.getName() != null)
+ return false;
+ else if (!name.equals(property.getName()))
return false;
- else if ( !name.equals( property.getName() ))
+ else if (type == null && property.getType() != null)
return false;
- else if ( type == null && property.getType() != null )
+ else if (!type.equals(property.getType()))
return false;
- else if ( !type.equals( property.getType() ))
+ else if (value == null && property.getValue() != null)
return false;
- else if ( value == null && property.getValue() != null )
+ else if (!value.equals(property.getValue()))
return false;
- else if ( !value.equals( property.getValue() ))
- return false;
return true;
}
}