mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
WW-5070 Uses else if to avoid double operation on stack
This commit is contained in:
@@ -224,9 +224,8 @@ public class JSONResult implements Result {
|
||||
if (rootObject instanceof ModelDriven) {
|
||||
LOG.debug("Action is an instance of ModelDriven, assuming model is on the top of the stack and using it");
|
||||
rootObject = stack.peek();
|
||||
}
|
||||
if (rootObject == null) {
|
||||
LOG.debug("Neither #action nor ModelDriven, peeking up object from top of the stack");
|
||||
} else if (rootObject == null) {
|
||||
LOG.debug("Neither #action nor ModelDriven, peeking up object from the top of the stack");
|
||||
rootObject = stack.peek();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user