< prev index next >

src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this

@@ -269,11 +269,11 @@
  
              // check receiver type
              if (!implClass.isAssignableFrom(receiverClass)) {
                  throw new LambdaConversionException(
                          String.format("Invalid receiver type %s; not a subtype of implementation type %s",
-                                       receiverClass, implClass));
+                                       receiverClass.descriptorString(), implClass.descriptorString()));
              }
          } else {
              // no receiver
              capturedStart = 0;
              samStart = capturedArity;

@@ -369,11 +369,11 @@
                  } else {
                      // must be convertible to primitive
                      return !strict;
                  }
              } else {
-                 // both are reference types: fromType should be a superclass of toType.
+                 // fromType should be a superclass of toType
                  return !strict || toType.isAssignableFrom(fromType);
              }
          }
      }
  
< prev index next >