From 7f74759bd61e7b31b563f180ab520debd6da07ae Mon Sep 17 00:00:00 2001 From: "szegedia%freemail.hu" Date: Wed, 27 Sep 2006 08:09:11 +0000 Subject: [PATCH] Avoiding double evaluation of an expression --- js/rhino/src/org/mozilla/javascript/MemberBox.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/rhino/src/org/mozilla/javascript/MemberBox.java b/js/rhino/src/org/mozilla/javascript/MemberBox.java index 5425b808b4c..c7efb956955 100644 --- a/js/rhino/src/org/mozilla/javascript/MemberBox.java +++ b/js/rhino/src/org/mozilla/javascript/MemberBox.java @@ -307,8 +307,9 @@ final class MemberBox implements Serializable outer: for (int i=0; i < parms.length; i++) { Class parm = parms[i]; - out.writeBoolean(parm.isPrimitive()); - if (!parm.isPrimitive()) { + boolean primitive = parm.isPrimitive(); + out.writeBoolean(primitive); + if (!primitive) { out.writeObject(parm); continue; }