Makes sense Andrew. Will take into account before
pushing final changes.

regards,
Sean.

On 25/11/2010 00:31, Dr Andrew John Hughes wrote:
On 25 November 2010 00:29, Dr Andrew John Hughes
<gnu_and...@member.fsf.org>  wrote:
On 22 November 2010 14:20, Vincent Ryan<vincent.x.r...@oracle.com>  wrote:
Fix looks good Sean.

On 22/11/2010 13:50, Seán Coffey wrote:
Brad, Vinnie,

This is a forward port of 6998583 to JDK 7. Can you review ?

http://cr.openjdk.java.net/~coffeys/6998583/webrev.6998583.0/

Thanks,
Sean.

In:
+
+                    (InputStream)java.security.AccessController.doPrivileged
+                        (new java.security.PrivilegedExceptionAction() {
+                            public Object run() throws
URISyntaxException, IOException {
+                                if
(device.getProtocol().equalsIgnoreCase("file")) {
+                                    return new FileInputStream(new
File(device.toURI()));
+                                } else {
+                                    return new
BufferedInputStream(device.openStream(), 512);
+                                }

run could return InputStream, avoiding the cast, as
PrivilegedExceptionAction can take InputStream as a type parameter.

Final example should have been:

+                    devRandom = java.security.AccessController.doPrivileged
+                        (new 
java.security.PrivilegedExceptionAction<InputStream>() {
+                            public InputStream run() throws
URISyntaxException, IOException {
+                                if
(device.getProtocol().equalsIgnoreCase("file")) {
+                                    return new FileInputStream(new
File(device.toURI()));
+                                } else {
+                                    return new
BufferedInputStream(device.openStream(), 512);
+                                }



Reply via email to