Hi Shilpi, In principle this change is ok, however these methods are kind of special because they are called by code generated from LambdaForms with erased types.
IIUC the casts can serve as belts-and-braces checks just in case that generated code passes something that is not of the correct type. By removing the casts it’s possible to erroneously pass in something of another type that the runtime treats erroneously as if a MethodHandle or MethodType, and then strange things happen. The casts will ordinary be removed by the runtime compiler. By removing them from the Java code it might slightly improve C2 compilation time. Approval from Vladimir/John would be good. Paul. > On 4 Feb 2016, at 13:16, shilpi rastogi <shilpi.rast...@oracle.com> wrote: > > Hi All, > > Please review the following- > > https://bugs.openjdk.java.net/browse/JDK-8071368 > http://cr.openjdk.java.net/~srastogi/8071368/webrev.02/ > > Thanks, > Shilpi