I really don't like this change.

I'd suggest moving newName to MailImpl, and hiding the random there, too.  Then 
you could revert the calling code to the way it was, except for changing from 
newName(originalMail) to MailImpl.newName(originalMail).

But even better, we already have

    public Mail duplicate() { ... }
    public Mail duplicate(String newName) { .. }

we could add:

    public Mail duplicate(boolean newName) {...}

and call that, rather than the constructor directly:

 - MailImpl newMail = new MailImpl(originalMail,newName(originalMail));
 + MailImpl newMail = (MailImpl) originalMail.duplicate(true);

        --- Noel



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to