[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Optimizing ControllerState
adrian@jboss.org
do-not-reply at jboss.com
Wed Oct 14 12:04:11 EDT 2009
There's also a simple optimization you can add to ControllerState.equals()
Currently it will be doing a string comparison even when the comparison is with itself. :-(
| public boolean equals(Object object)
| {
| + if (object == this)
| + return true;
| if (object == null || object instanceof ControllerState == false)
| return false;
| ControllerState other = (ControllerState) object;
| return stateString.equals(other.stateString);
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260351#4260351
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260351
More information about the jboss-dev-forums
mailing list