OSDN Git Service

Fix constructor access check through reflection
authorSebastien Hertz <shertz@google.com>
Tue, 28 Apr 2015 13:00:41 +0000 (15:00 +0200)
committerSebastien Hertz <shertz@google.com>
Tue, 28 Apr 2015 14:37:57 +0000 (16:37 +0200)
commitc71d9218b640224af9ab73c088263a454ddd3b34
treec6beb5eacf89fb69063ba34b6c04b148bff67db5
parent0dd76cd3f09f495a1b9a0e4f8712c09ff885c6fd
Fix constructor access check through reflection

We must not throw IllegalAccessException if the constructor has been
made accessible by a previous call to Constructor.setAccessible, even
if the caller cannot access the constructor.

Bug: 20639158

(cherry picked from commit 2d2f2a9c665b02ca5139f71e37ca5e08389e4191)

Change-Id: Ic5cb54256f11aefcfaa99f2ee85c4a32f30e693a
runtime/native/java_lang_reflect_Constructor.cc
test/100-reflect2/src/Main.java