<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hi Sergey, </div><div class=""><br class=""></div>Nifty. <div class="">The “<span style="background-color: rgb(255, 255, 255);" class=""><font color="#333333" face="Arial, sans-serif" class="">Arrays.stream” approach handles the case where the passed in parameter is null? Assuming, yes, then looks good to me.</font></span><div class=""><font color="#333333" face="Arial, sans-serif" class=""><span style="caret-color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class=""><br class=""></span></font></div><div class=""><font color="#333333" face="Arial, sans-serif" class=""><span style="caret-color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class="">Dan<br class=""></span></font><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 20, 2018, at 10:27 PM, Sergey Bylokhov <<a href="mailto:Sergey.Bylokhov@oracle.com" class="">Sergey.Bylokhov@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello, Audio Guru.<br class=""><br class="">Please review the small cleanup for jdk11.<br class=""><br class="">Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8205456" class="">https://bugs.openjdk.java.net/browse/JDK-8205456</a><br class="">Webrev: <a href="http://cr.openjdk.java.net/~serb/8205456/webrev.00" class="">http://cr.openjdk.java.net/~serb/8205456/webrev.00</a><br class=""><br class="">Currently we have a few patters to work with arrays in JavaSound.<br class=""> - Iterates using the for loop<br class=""> - Iterates using Arrays.asList<br class=""> - Iterates using Stream.of<br class=""><br class=""> - I suggest to unify this and use Arrays.stream in all cases, because it works for arrays of objects and primitives(I have skip AudioSystem/MidiSystem in this fix, I will update them some time later)<br class=""> - In a few places I also changed manual iteration over array to ".clone()"<br class=""> - small cleanup is done(empty lines/unused vars/etc are removed)<br class=""><br class="">-- <br class="">Best regards, Sergey.<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>