[ http://mc4j.org/jira/browse/STS-231?page=all ]

Tim Fennell resolved STS-231.
-----------------------------

    Resolution: Duplicate

> Javascript Builder creating invalid Javascript for Lists
> --------------------------------------------------------
>
>                 Key: STS-231
>                 URL: http://mc4j.org/jira/browse/STS-231
>             Project: Stripes
>          Issue Type: Bug
>    Affects Versions: Release 1.3.2
>         Environment: JDK1.5, Win32
>            Reporter: Simon
>         Assigned To: Tim Fennell
>            Priority: Minor
>
> The JavascriptBuilder uses a Set<Object> to track visted objects and hence 
> avoid exporting the same object multiple times.  However Set< > uses 
> Object.equals() method to determine membership not object identity.   
> Therefore the visited object set is actually tracking "equal" objects.   
> Unfortunately Java's AbstractList class overrides equals() such that Lists 
> containing the same elements are considered equal.  This causes the following 
> simple test case to generate invalid Javascript from JavascriptBuilder:
> HashMap h = new HashMap();
> h.put("list1", new ArrayList());
> h.put("list2", new ArrayList());
> new JavaScriptBuilder(h).build(new StringWriter());

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to