Code review request, JDK-8010815, some constructors issues in com.sun.jndi.toolkit (original) (raw)

Xuelei Fan xuelei.fan at oracle.com
Tue May 28 01:31:54 UTC 2013


Ping again, any one available to review this changeset?

Thanks, Xuelei

On 5/13/2013 11:06 PM, Xuelei Fan wrote:

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.fan at 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



More information about the core-libs-dev mailing list