On Wed, 2 Jun 2021 15:25:16 GMT, Patrick Concannon <[email protected]>
wrote:
> Hi,
>
> Could someone please review my code for updating the code in the `java.lang`
> packages to make use of the switch expressions?
>
> Kind regards,
> Patrick
src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java line 278:
> 276: private static boolean isObjectMethod(Method m) {
> 277: return switch (m.getName()) {
> 278: case "toString" -> (m.getReturnType() == String.class
the extra parenthesis are not needed
-------------
PR: https://git.openjdk.java.net/jdk/pull/4312