<Sound Dev> [15] Review Request: 8236980 Cleanup of toString methods in JavaSound

Phil Race philip.race at oracle.com
Wed Jan 22 16:54:33 UTC 2020


http://cr.openjdk.java.net/~serb/8236980/webrev.00/src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java.sdiff.html

- * Provides a string representation of the device information.
+ * Returns a string representation of the info object.
           *
- * @return a description of the info object
+ * @return a string representation of the info object Why is this 
better ? What is an "info object" ? Why not ?
"Returns a string representation of the device"? And it returns the same 
thing as "name" anyway. Are you avoiding over-specifying to that extent 
? Yet you preserve that same behaviour here (and elsewhere) :- 
http://cr.openjdk.java.net/~serb/8236980/webrev.00/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java.udiff.html 
Are you intending a CSR for any of this ? -phil

On 1/12/20 12:14 PM, Sergey Bylokhov wrote:
> Hello.
> Please review a "weekend cleanup" for JDK 15.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8236980
> Fix: http://cr.openjdk.java.net/~serb/8236980/webrev.00
>
> I have made these changes:
>  - The words in the specs are unified across the different methods
>  - All toString() implementations now use getXXX() methods instead
>    of direct access to the fields(the getxxx() methods are skipped
>    only if the getxxx() method is final)
>  - A few tests were added to check some spec, and its implementations
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/sound-dev/attachments/20200122/a0974a39/attachment.htm>


More information about the sound-dev mailing list