Subj : Different operator behavior with JDK 1.3 vs. 1.4? To : netscape.public.mozilla.jseng From : Keith Tingle Date : Mon Nov 08 2004 11:00 am Hi- We are seeing a strange problem with some legacy scripts and the == and != operators. We embed Rhino in a document processing application via BSF, our script writers use javascript to customize processing. Here is a section of a problematic script; importPackage (java.lang) nps = bsf.lookupBean("NPS"); var last_record = nps.getProperties().get("last_record"); var current_record = nps.getProperties().get("current_record"); System.out.println ("last_record=" + last_record + ",current_record=" + current_record + " -> " (last_record == current_record)); *** Under JDK 1.3 the output is a follows; last_record=2,current_record=2 -> false last_record=2,current_record=2 -> true Under JDK 1.4 the output is as follows; last_record=2,current_record=2 -> true last_record=2,current_record=2 -> true *** Both the last_record & the current_record properties are stored as Strings in hashes in the hosting app. So the == operator behaves differently once the JDK is updated from 1.3 to 1.4... Has anyone else seen this behavior from Rhino under JDK 1.3? Thanks in advance for any comments or assistance. Keith .