--- a/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Thu Oct 17 20:56:07 2013 +0800
+++ b/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Wed Oct 16 17:55:49 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, 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
@@ -609,6 +609,7 @@
cls = cls.getComponentType();
if (cls.isPrimitive())
return true; // int[].class, for example
+ // could use VerifyAccess.isClassAccessible but the following is a safe approximation
if (cls.getClassLoader() != Object.class.getClassLoader())
return false;
if (VerifyAccess.isSamePackage(MethodHandle.class, cls))