Get rid of lousy "Method-Invocation-Chaining"-trick

Ulf Zibis Ulf.Zibis at gmx.de
Mon Apr 27 17:10:56 UTC 2009


Hi all,

IMHO, implementing "Method-Invocation-Chaining" by simply returning 
"this" from regarding methods in Java-API was bad idea, because it 
doesn't really work, if a class is subclassed. For example see XxxBuffer 
classes, subclassed from java.nio.Buffer.

So I think, it's time for a simple enhancement in Java syntax, and get 
rid of those "return this"-methods:
http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/001180.html

What do you think here from core-libs side ?

Regards,

-Ulf






More information about the core-libs-dev mailing list