[concurrency-interest] Object.wait(long) not returning the time remaining.

Jason Mehrens jason_mehrens at hotmail.com
Tue Nov 1 17:29:09 EST 2005

This might be off topic but, can someone clarify the evaluation of RFE 
6176773 to me? Here is the link: 

The evaluator states: "The actual signature of Object.wait can never be 
changed, because of binary
compatibility."  I don't see how changing the return type of a final void 
method can break binary compatibility (adding a new method to Object is a 
different story).  The method has a void return type so no caller is looking 
at the return value, there is none.  The method is final so no subclass or 
interface has to deal with return type change because it can't override 
method.  Existing code does care what the return type because it doesn't 
access it.

Reflection is the only thing I can think of that might break if the code is 
explicitly checking the return type of Object.wait(long) and taking a 
different code path if it is not void.  Since everything is an "Object" why 
would use reflection to call wait?  Maybe an introspection tool would look 
at the return type but I doubt it would cause tool from working.

Jason Mehrens

More information about the Concurrency-interest mailing list