(14) RFR JDK-8225773: jdeps --check produces NPE if there are missing module dependences

2020-01-08 Thread Mandy Chung
Webrev:    http://cr.openjdk.java.net/~mchung/jdk14/8225773/webrev.00/ jdeps --check throws NPE when the module descriptor has missing dependences.  This patch fixes jdeps --check option to report a module with missing dependences as other jdeps options. This patch applies on the top of the p

(14) RFR JDK-8229396: jdeps ignores multi-release when generate-module-info used on command line

2020-01-08 Thread Mandy Chung
Webrev: http://cr.openjdk.java.net/~mchung/jdk14/8229396/webrev.00/index.html This fixes jdeps --generate-module-info option to read a multi-release JAR with the version specified at --multi-release option.  Also it enhances jdeps to report missing dependences as other options such as --list-deps

Re: Lookup objects and setAccessible

2020-01-08 Thread Kasper Nielsen
Hi Mandy, Yes, but they create a member which is not accessible. As far as I can see, all places where AccessibleObject.override is ever set there is a check of the current caller with Reflection.getCallerClass(). /Kasper On Wed, 8 Jan 2020 at 19:25, Mandy Chung wrote: > > Have you looked at L

Re: Lookup objects and setAccessible

2020-01-08 Thread Mandy Chung
Have you looked at Lookup::revealDirect and MethodHandleInfo::reflectAs? Mandy On 1/8/20 5:49 AM, Kasper Nielsen wrote: Sorry, I could have been a bit more specific. I meant something like Method.setAccessible(Lookup, true) I want to base an API on lookup objects. But I want to still support s

Re: Lookup objects and setAccessible

2020-01-08 Thread Kasper Nielsen
Sorry, I could have been a bit more specific. I meant something like Method.setAccessible(Lookup, true) I want to base an API on lookup objects. But I want to still support some use cases where people rely on java.lang.reflect.Field|Constructor|Method. Specifically, being able to create an Executa

Re: Lookup objects and setAccessible

2020-01-08 Thread Remi Forax
see https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/invoke/MethodHandles.html#privateLookupIn(java.lang.Class,java.lang.invoke.MethodHandles.Lookup) Rémi - Mail original - > De: "Kasper Nielsen" > À: "jigsaw-dev" > Envoyé: Mercredi 8 Janvier 2020 12:14:30 > Objet

Lookup objects and setAccessible

2020-01-08 Thread Kasper Nielsen
Hi, I'm trying to bridge some old code using java.lang.reflect and some new code that uses Lookup objects. And I'm wondering if there is some way to make a member accessible using a Lookup object? Or if open packages/modules via module-info.java + member.setAccessible(true) is the only way? Thank