mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
25d69f38ee
An inner class has two sets of modifier flags: one is declared in the usual place in the class file and the other is part of the InnerClasses attribute. Not only is that redundant, but they can contradict, and the VM can't just pick one and roll with it. Instead, Class.getModifiers must return the InnerClasses version, whereas reflection must check the top-level version. So even if Class.getModifiers says the class is protected, it might still be public for the purpose of reflection depending on what the InnerClasses attribute says. Crazy? Yes. |
||
---|---|---|
.. | ||
testing/annotations | ||
TestReflection.java |