Skip to content

Commit 459a318

Browse files
committed
No need to nest else
1 parent c57b627 commit 459a318

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/org/apache/commons/jxpath/ri/model/VariablePointer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,7 @@ public Object getImmediateNode() {
251251
public NodePointer getImmediateValuePointer() {
252252
if (valuePointer == null) {
253253
Object value;
254-
if (actual) {
255-
value = getImmediateNode();
256-
valuePointer = newChildNodePointer(this, null, value);
257-
}
258-
else {
254+
if (!actual) {
259255
return new NullPointer(this, getName()) {
260256
private static final long serialVersionUID = 1L;
261257

@@ -266,6 +262,8 @@ public Object getImmediateNode() {
266262
}
267263
};
268264
}
265+
value = getImmediateNode();
266+
valuePointer = newChildNodePointer(this, null, value);
269267
}
270268
return valuePointer;
271269
}

0 commit comments

Comments
 (0)