Polishing

This commit is contained in:
Juergen Hoeller
2014-09-29 23:40:32 +02:00
parent b91cab1fde
commit 43d40187d9
3 changed files with 154 additions and 129 deletions

View File

@@ -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;
}
}