RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14]
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Fri Apr 8 09:04:16 UTC 2022
On Fri, 8 Apr 2022 08:51:30 GMT, Tejesh R <duke at openjdk.java.net> wrote:
>> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required.
>
> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>
> Updated based on Review Comments
test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 61:
> 59: prevSysOut = System.out;
> 60: testOut = new ByteArrayOutputStream();
> 61: System.setOut(new PrintStream(testOut, true, StandardCharsets.UTF_8));
The spec says "First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setIO") permission to see if it's ok to reassign the "standard" output stream."
Since security manager is removed, I guess either this doc needs updation or we still need to follow this checkPermission step...
-------------
PR: https://git.openjdk.java.net/jdk/pull/7754
More information about the client-libs-dev
mailing list