Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Peter Levart
Hi Rony, On 01/22/18 16:35, Rony G. Flatscher wrote: Hi Peter, thank you *very* much also for your kind explanations and even coming up with agent code to demonstrate how one could use that approach! In fact I have been doing a static analysis in the past (since Java 1.1) to determine

Re: Reflection: how does one access ...

2018-01-22 Thread Roger Riggs
Hi, Attaching the patch as a .patch or .txt file should be sufficient for small contributions and example code. Roger On 1/22/2018 10:39 AM, Rony G. Flatscher wrote: Hi, On 22.01.2018 16:24, Roger Riggs wrote: Contributions need to be submitted using the OpenJDK infrastructure to adhere

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Rony G. Flatscher
Hi, On 22.01.2018 16:24, Roger Riggs wrote: > Contributions need to be submitted using the OpenJDK infrastructure to adhere > to the IP requirements. Would you have a link which OpenJFDK infrastructure to use in this case? > The mail lists shold pass attachments that are text and patches though

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Rony G. Flatscher
On 22.01.2018 12:18, Alan Bateman wrote: > On 22/01/2018 09:58, Peter Levart wrote: >> : >> >> The 2nd problem is not trivial as you want to access a protected member on >> behalf of some other >> sub-class of the member's declaring class which is not cooperating >> (voluntarily handing you an

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Rony G. Flatscher
Hi Peter, thank you *very* much also for your kind explanations and even coming up with agent code to demonstrate how one could use that approach! In fact I have been doing a static analysis in the past (since Java 1.1) to determine whether members should be accessible to Rexx, restricting

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Roger Riggs
Hi, Contributions need to be submitted using the OpenJDK infrastructure to adhere to the IP requirements. The mail lists shold pass attachments that are text and patches though you may need to be sure your mailer attaches them with the correct mime-types and/or extensions. Roger p.s. The

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Rony G. Flatscher
On 19.01.2018 15:38, Alan Bateman wrote: > On 18/01/2018 15:07, Rony G. Flatscher wrote: >> An attachment in the email has been found to contain executable code and has >> been removed. >> >> File removed : java9modules.zip, zip,cmd >>

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Peter Levart
@Potential implementer of below trick BEWARE! While I tried to be smart by "injecting" special java agent powers into designated trusted class, the presented mechanism is NOT SAFE as I identify the class only by it's name. An attacker might create it's own pair of classes with same names

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Peter Levart
On 01/22/2018 12:18 PM, Alan Bateman wrote: On 22/01/2018 09:58, Peter Levart wrote: : The 2nd problem is not trivial as you want to access a protected member on behalf of some other sub-class of the member's declaring class which is not cooperating (voluntarily handing you an instance of

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Peter Levart
Hi Rony, On 01/22/2018 10:58 AM, Peter Levart wrote: The 2nd problem is not trivial as you want to access a protected member on behalf of some other sub-class of the member's declaring class which is not cooperating (voluntarily handing you an instance of its Lookup object). This currently

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Alan Bateman
On 22/01/2018 09:58, Peter Levart wrote: : The 2nd problem is not trivial as you want to access a protected member on behalf of some other sub-class of the member's declaring class which is not cooperating (voluntarily handing you an instance of its Lookup object). This currently requires

Re: Reflection: how does one access a protected member in a superclass reflectively?

2018-01-22 Thread Peter Levart
Hi Rony, On 01/18/2018 04:11 PM, Rony G. Flatscher wrote: On 18.01.2018 10:58, Alan Bateman wrote: On 17/01/2018 18:53, Rony G. Flatscher wrote: : Would you have concrete suggestions for this use-case, i.e. a framework that is not part of a module, but having a need to access public types