On 25/01/17 12:32, Alan Bateman wrote:
On 25/01/2017 11:05, Pavel Rappo wrote:Hello, Could you please review the following change for [1]? http://cr.openjdk.java.net/~prappo/8170116/webrev.00/
Hi Alan,
I agree with Daniel on the name. Also the comment in the Bridge constructor says "Bridge.get() is always called in doPrivileged() blocks" which is at odds with the permission check in Bridge.get. That is, if Bridge.get is always called with privileges then the permission check is not needed.
The comment was intended to explain that doPrivileged is not needed in new Bridge() because the code that calls Bridge.get() (which in turn creates new Bridge) uses doPrivileged to call Bridge.get()). Otherwise creating the StackWalker in new Bridge might have caused a new SecurityException to be propagated to user code at the time bridge creation was triggered. But maybe the comment should be removed if it's misleading. cheers, -- daniel
-Alan.
