> On 8 Apr 2016, at 15:37, Michael Haupt <[email protected]> wrote: > > Hi Paul, > > note this is a lower-case review. Thumbs up. > > I like how the test lucidly documents the access rules, and would applaud an > extended test that additionally covers module boundaries. > > Just as a suggestion, how about using the fact that enum values are > technically instances of subclasses of the enum and getting rid of the > switches in FieldLookup.lookup/isAccessibleField by replacing the two with > overridden methods in each of the enum elements? Switching over "this" just > calls for polymorphism, and the default cases are dead code. Admittedly, it's > a matter of style. :-) >
Done, updated in place: http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8152645-VH-access-control/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8152645-VH-access-control/webrev/> Thanks, Paul.
