From c14ec1c2953f4ca808f4cbbff9f00fe14bb50aab Mon Sep 17 00:00:00 2001 From: "duncan.macgregor" Date: Tue, 3 Dec 2024 12:36:09 +0000 Subject: [PATCH] Minor style change round if...else cases with `return`. --- .../java/org/mozilla/javascript/AccessorSlot.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 {