Le 05/09/2010 09:04, John Rose a écrit : > One important API point in MethodHandles: A SAM constructor for method > handles. > > http://cr.openjdk.java.net/~jrose/6953246/webrev.00/ > > The answer to the question "Should we delegate equals/hashCode to the targets?" The answer is no !
hashcode should be System.identityHashCode(proxy) equals should be proxy == args[0] and toString() should returns getClass().getName() + '@' + Integer.toHexString(hashCode()). i.e the proxy must simulate the fact that the SAM inherits from java.lang.Object. Rémi _______________________________________________ mlvm-dev mailing list [email protected] http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
