<Sound Dev> [11] Review Request: 8205456 Unification of iterations over arrays
Dan Rollo
danrollo at gmail.com
Thu Jun 21 21:44:06 UTC 2018
Hi Sergey,
Nifty.
The “Arrays.stream” approach handles the case where the passed in parameter is null? Assuming, yes, then looks good to me.
Dan
> On Jun 20, 2018, at 10:27 PM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
>
> Hello, Audio Guru.
>
> Please review the small cleanup for jdk11.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8205456
> Webrev: http://cr.openjdk.java.net/~serb/8205456/webrev.00
>
> Currently we have a few patters to work with arrays in JavaSound.
> - Iterates using the for loop
> - Iterates using Arrays.asList
> - Iterates using Stream.of
>
> - 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)
> - In a few places I also changed manual iteration over array to ".clone()"
> - small cleanup is done(empty lines/unused vars/etc are removed)
>
> --
> Best regards, Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20180621/21d9aa65/attachment.html>
More information about the sound-dev
mailing list