Author: julien(a)jboss.com
Date: 2008-07-07 08:34:55 -0400 (Mon, 07 Jul 2008)
New Revision: 11314
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/StructuralObjectImpl.java
Log:
removing the need for equals method on StructuralObject since now state comparison is done
with the refresh operation
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralObjectImpl.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralObjectImpl.java 2008-07-07
12:32:50 UTC (rev 11313)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralObjectImpl.java 2008-07-07
12:34:55 UTC (rev 11314)
@@ -77,46 +77,4 @@
{
return state;
}
-
- public boolean equals(Object obj)
- {
- if (obj == this)
- {
- return true;
- }
- if (obj instanceof StructuralObjectImpl)
- {
- StructuralObjectImpl that = (StructuralObjectImpl)obj;
-
- //
- if (!that.id.equals(this.id))
- {
- return false;
- }
-
- //
- if (!that.state.equals(this.state))
- {
- return false;
- }
-
- //
- if (that.parentId == null)
- {
- if (this.parentId != null)
- {
- return false;
- }
- }
- else if (!that.parentId.equals(this.parentId))
- {
- return false;
- }
-
- //
- return that.childrenIds.equals(this.childrenIds);
- }
- return false;
-// throw new UnsupportedOperationException();
- }
}
\ No newline at end of file
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java 2008-07-07
12:32:50 UTC (rev 11313)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java 2008-07-07
12:34:55 UTC (rev 11314)
@@ -37,8 +37,6 @@
StructuralState getState();
- boolean equals(Object obj);
-
/**
* A comparison between two structural objects.
*/
Modified:
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/StructuralObjectImpl.java
===================================================================
---
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/StructuralObjectImpl.java 2008-07-07
12:32:50 UTC (rev 11313)
+++
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/StructuralObjectImpl.java 2008-07-07
12:34:55 UTC (rev 11314)
@@ -62,26 +62,4 @@
{
return handle.id;
}
-
- public StructuralState getState()
- {
- return state;
- }
-
- public boolean equals(Object obj)
- {
- if (obj == this)
- {
- return true;
- }
- if (obj instanceof StructuralObjectImpl)
- {
- StructuralObjectImpl that = (StructuralObjectImpl)obj;
-
- //
- return handle.equals(that.handle);
- }
- return false;
-// throw new UnsupportedOperationException();
- }
}