From Sergey.Bylokhov at oracle.com Sat Jun 9 22:49:17 2018 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Sat, 9 Jun 2018 15:49:17 -0700 Subject: [11] Review Request: 8204454 Remove of sun.applet.AppletAudioClip Message-ID: <43378e5e-25fa-9cad-99c0-629624930b05@oracle.com> Hello, Audio Guru. Please review the fix for jdk11. Bug: https://bugs.openjdk.java.net/browse/JDK-8204454 Webrev: http://cr.openjdk.java.net/~serb/8204454/webrev.00 The sun.applet.AppletAudioClip class is a part of implementation of Applet API related to JavaSound. Long time ago this class was only one implementation of java.applet.AudioClip, but currently it is just a wrapper on top of com.sun.media.sound.JavaSoundAudioClip. As part of the effort to drop "sun.applet" package it is possible to remove AppletAudioClip, and replace its usage by JavaSoundAudioClip. The only difference between AppletAudioClip and JavaSoundAudioClip is that AppletAudioClip ignores all possible exceptions, this is why I have updated implementation of JavaSoundAudioClip to do the same. -- Best regards, Sergey. From philip.race at oracle.com Tue Jun 12 17:28:15 2018 From: philip.race at oracle.com (Phil Race) Date: Tue, 12 Jun 2018 10:28:15 -0700 Subject: [11] Review Request: 8204454 Remove of sun.applet.AppletAudioClip In-Reply-To: <43378e5e-25fa-9cad-99c0-629624930b05@oracle.com> References: <43378e5e-25fa-9cad-99c0-629624930b05@oracle.com> Message-ID: <5105c13a-7399-0570-430b-b4c39b622f98@oracle.com> +1 -phil. On 06/09/2018 03:49 PM, Sergey Bylokhov wrote: > Hello, Audio Guru. > > Please review the fix for jdk11. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8204454 > Webrev: http://cr.openjdk.java.net/~serb/8204454/webrev.00 > > The sun.applet.AppletAudioClip class is a part of implementation of > Applet API related to JavaSound. Long time ago this class was only one > implementation of java.applet.AudioClip, but currently it is just a > wrapper on top of com.sun.media.sound.JavaSoundAudioClip. > > As part of the effort to drop "sun.applet" package it is possible to > remove AppletAudioClip, and replace its usage by JavaSoundAudioClip. > > The only difference between AppletAudioClip and JavaSoundAudioClip is > that AppletAudioClip ignores all possible exceptions, this is why I > have updated implementation of JavaSoundAudioClip to do the same. > > From Sergey.Bylokhov at oracle.com Thu Jun 21 02:27:39 2018 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Wed, 20 Jun 2018 19:27:39 -0700 Subject: [11] Review Request: 8205456 Unification of iterations over arrays Message-ID: <2036e590-2af4-ec8d-9b83-e96bb55e2522@oracle.com> 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. From danrollo at gmail.com Thu Jun 21 21:44:06 2018 From: danrollo at gmail.com (Dan Rollo) Date: Thu, 21 Jun 2018 17:44:06 -0400 Subject: [11] Review Request: 8205456 Unification of iterations over arrays In-Reply-To: <2036e590-2af4-ec8d-9b83-e96bb55e2522@oracle.com> References: <2036e590-2af4-ec8d-9b83-e96bb55e2522@oracle.com> Message-ID: 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 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: From philip.race at oracle.com Thu Jun 21 22:54:09 2018 From: philip.race at oracle.com (Phil Race) Date: Thu, 21 Jun 2018 15:54:09 -0700 Subject: [11] Review Request: 8205456 Unification of iterations over arrays In-Reply-To: References: <2036e590-2af4-ec8d-9b83-e96bb55e2522@oracle.com> Message-ID: <6a2f66f5-18ae-6748-2186-8fddae3967ed@oracle.com> Assuming Dan gets a satisfactory answer, this is OK by me. -phil. On 06/21/2018 02:44 PM, Dan Rollo wrote: > 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 >> > 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: From Sergey.Bylokhov at oracle.com Thu Jun 21 23:54:35 2018 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Thu, 21 Jun 2018 16:54:35 -0700 Subject: [11] Review Request: 8205456 Unification of iterations over arrays In-Reply-To: References: <2036e590-2af4-ec8d-9b83-e96bb55e2522@oracle.com> Message-ID: <9571027b-e5b7-f7ae-7fbb-8045e9fd1143@oracle.com> Yes, unlike "Arrays.asList" which accepts null, the ?Arrays.stream? will throw NPE(so result is the same as before the fix) On 21/06/2018 14:44, Dan Rollo wrote: > 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 >> > 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. > -- Best regards, Sergey. From danrollo at gmail.com Fri Jun 22 00:00:51 2018 From: danrollo at gmail.com (Dan Rollo) Date: Thu, 21 Jun 2018 20:00:51 -0400 Subject: [11] Review Request: 8205456 Unification of iterations over arrays In-Reply-To: <9571027b-e5b7-f7ae-7fbb-8045e9fd1143@oracle.com> References: <2036e590-2af4-ec8d-9b83-e96bb55e2522@oracle.com> <9571027b-e5b7-f7ae-7fbb-8045e9fd1143@oracle.com> Message-ID: +1 Dan > On Jun 21, 2018, at 7:54 PM, Sergey Bylokhov wrote: > > Yes, unlike "Arrays.asList" which accepts null, the ?Arrays.stream? will throw NPE(so result is the same as before the fix) > > On 21/06/2018 14:44, Dan Rollo wrote: >> 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 >> 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. > > > -- > Best regards, Sergey. -------------- next part -------------- An HTML attachment was scrubbed... URL: