This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [path] refactored ReplPane.enter() / cleanups


I checked this change in. Congratulations on your first Kawa check-in!

On 04/12/2011 01:35 PM, Charles Turner wrote:
I don't understand the comment that Thread.destroy() isn't implemented, it is,
but that's also deprecated! Ugh.

Nope - it just throws a NoSuchMethodError().



I don't think changing 'kind == ReplPane.ViewableElementName' to
'kind.equals(ReplPane.ViewableElementName)' is needed unless Swing
behind-the-scenes makes a copy of the incoming String.  I guess in
theory Swing might do that (perhaps internally Swing might use UTF-8
byte arrays - like javac does), and the code is not performance-critical,
so it may be reasonable to use equals.

Ah, I might have made a mistake here, I was worried that this condition might not have been what was intended, since I thought the object references might have been different, even though the contents of the strings were the same.

Please may someone explain why this is done,

public static final String ViewableElementName = "Viewable";
public static final Object ViewableAttribute =
     new String(ViewableElementName);

Why bother with the String constructor?

I don't remember, but presumably it was to have a unique unforgeable object as a key.

I left this unchanged, using == rather than equals.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]