Review request: 8004260: dynamic proxy class should have same class access as proxy interfaces

Alan Bateman Alan.Bateman at oracle.com
Mon Apr 15 18:13:18 UTC 2013


On 12/04/2013 19:36, Mandy Chung wrote:
> Dynamic proxy class is specified to be public, final, and not
> abstract.  For a proxy class that implements a non-public interface,
> it will be in the same package as the non-public interface
> but the proxy class is accessible outside of the non-public
> interface's runtime package. This change will make dynamic proxy
> class to have the same Java language access as the proxy interfaces
> so that creating a proxy instance to implement a non-public interface
> will be guarded by the Java language access check.
>
> Webrev at:
> http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8004260/webrev.00/
>
> Specdiff at:
> http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8004260/specdiff/overview-summary.html 
>
>
> This change also updates the spec to specify the permission checks
> by Proxy.getProxyClass and Proxy.newProxyInstance methods and removes
> the system properties which provide a workaround for 7u releases and
> not needed in jdk8.
>
> Thanks
> Mandy
I went through the webrev and it looks good to me and good to get this 
aligned and specified clearly.

A minor comment is that in the save for debugging code in 
generateProxyClass then you could use Files.write to write the class 
file in one method if you want.

-Alan.



More information about the core-libs-dev mailing list