--- old/src/share/classes/java/lang/invoke/CallSite.java 2014-07-11 20:08:45.000000000 +0400 +++ new/src/share/classes/java/lang/invoke/CallSite.java 2014-07-11 20:08:45.000000000 +0400 @@ -319,7 +319,7 @@ throw new ClassCastException("bootstrap method failed to produce a CallSite"); } if (!site.getTarget().type().equals(type)) - throw new WrongMethodTypeException("wrong type: "+site.getTarget()); + throw wrongTargetType(site.getTarget(), type); } catch (Throwable ex) { BootstrapMethodError bex; if (ex instanceof BootstrapMethodError)