[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Uninstall OnDemand context if there are no more dependen
alesj
do-not-reply at jboss.com
Wed Jul 15 05:13:08 EDT 2009
"kabir.khan at jboss.com" wrote :
|
| | int requiredIndex = states.indexOf(item.getWhenRequired());
| | int actualIndex = states.indexOf(dependsContext.getState());
| | if (requiredIndex <= actualIndex)
| |
| |
|
Such code should not exist, as it depends on the impl details (== List) of the states model.
You should do this state checks against ControllerStateModel.
e.g. for tree states the model will change, but the rest of the code won't have to be fixed/modified ;-)
(at least not in a hard to detect/find it way)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243689#4243689
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243689
More information about the jboss-dev-forums
mailing list