Polishing
This commit is contained in:
@@ -62,7 +62,7 @@ public abstract class SpelNodeImpl implements SpelNode {
|
||||
SpelNodeImpl result = null;
|
||||
if (this.parent != null) {
|
||||
for (SpelNodeImpl child : this.parent.children) {
|
||||
if (this==child) {
|
||||
if (this == child) {
|
||||
break;
|
||||
}
|
||||
result = child;
|
||||
@@ -78,18 +78,16 @@ public abstract class SpelNodeImpl implements SpelNode {
|
||||
if (this.parent != null) {
|
||||
SpelNodeImpl[] peers = this.parent.children;
|
||||
for (int i = 0, max = peers.length; i < max; i++) {
|
||||
if (peers[i] == this) {
|
||||
if ((i + 1) >= max) {
|
||||
if (this == peers[i]) {
|
||||
if (i + 1 >= max) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Class<?> clazz = peers[i + 1].getClass();
|
||||
for (Class<?> desiredClazz : clazzes) {
|
||||
if (clazz.equals(desiredClazz)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user