diff --git a/rhino/src/main/java/org/mozilla/javascript/AccessorSlot.java b/rhino/src/main/java/org/mozilla/javascript/AccessorSlot.java index 690c4245c3..5cbb465904 100644 --- a/rhino/src/main/java/org/mozilla/javascript/AccessorSlot.java +++ b/rhino/src/main/java/org/mozilla/javascript/AccessorSlot.java @@ -117,22 +117,22 @@ Function getGetterFunction(String name, Scriptable scope) { boolean isSameGetterFunction(Object function) { if (function == Scriptable.NOT_FOUND) { return true; - } else if (getter == null) { + } + if (getter == null) { return ScriptRuntime.shallowEq(Undefined.instance, function); - } else { - return getter.isSameGetterFunction(function); } + return getter.isSameGetterFunction(function); } @Override boolean isSameSetterFunction(Object function) { if (function == Scriptable.NOT_FOUND) { return true; - } else if (setter == null) { + } + if (setter == null) { return ScriptRuntime.shallowEq(Undefined.instance, function); - } else { - return setter.isSameSetterFunction(function); } + return setter.isSameSetterFunction(function); } interface Getter {