<Swing Dev> [PATCH] 6463712: JSpinner forwards events from old model
David Gilbert
david.gilbert at object-refinery.com
Tue May 29 16:02:07 UTC 2007
Hi Richard,
Richard Bair wrote:
> Hey Dave, thanks for the patch.
>
> For those following along, I've been talking with Dave about it
> offline, sorry for not posting back to the openjdk list. I'm repenting
> :-). Also, due to post-JavaOne vacations, this is taking a wee bit
> longer than usual.
>
> I've looked at the patch, it looks good. I *really* appreciate the
> supplied test as well. The only thing I need to verify is that
> oldModel is never null (or this new line would produce an NPE). From a
> cursory look at JSpinner, it appears to never be null, but I need to
> take another look.
I thought about the possibility of an NPE, but I don't think it can
happen. As I understood it, if modelListener is 'not null', then a
model must have been set already. Subsequent to that, it isn't possible
to set a null model, so when modelListener is 'not null', oldModel must
be 'not null' too. If I'm wrong, hopefully you, someone else, or the
test suites will spot it!
>
> Also, I'm working with Igor on a code review and putback.
>
Great!
Dave
More information about the swing-dev
mailing list