On 5/13/2013 10:52 PM, Wang Weijun wrote: > I'll read them tomorrow. OK. It's not a urgent fix.
> One question: are all of them designed to be call-by-value instead of > shareable? > I'm not sure I understand the term "call-by-value" or "shareable". From my understand, they are public classes, and copy-on-write or share-value is the not right solution. Cloning mutable objects is more robust. Otherwise, we need to check every caller to the method and the thread stacks to make sure it is not abused. It's nightmare to maintain such code. In the JNDI specification, we normally declare like "This constructor will not modify environment or save a reference to it, but may save a clone. Caller should not modify mutable keys and values in environment after it has been passed to the constructor." Thanks, Xuelei > Thanks > Max > > On May 13, 2013, at 10:05 PM, Xuelei Fan <xuelei....@oracle.com> wrote: > >> Hi, >> >> There is some constructors issues about mutable objects in >> com.sun.jndi.toolkit. >> >> webrev: http://cr.openjdk.java.net/~xuelei/8010815/webrev.00/ >> >> Thanks, >> Xuelei