On Fri, 25 Oct 2024 21:09:19 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:

>> test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/GetSoundBankSecurityException.java
>>  line 1:
>> 
>>> 1: /*
>> 
>> I believe this test becomes irrelevant without `SecurityManager`.
>> 
>> The summary of the test states, “`MidiSystem.getSoundbank()` throws 
>> unexpected `SecurityException`” which couldn't happen if there's no security 
>> manager. Also see [JDK-8312535](https://bugs.openjdk.org/browse/JDK-8312535).
>
> Right the JBS is about SM & SecurityException, but the test was repurposed to 
> check if InvalidMidiDataException is thrown and to test this case for code 
> coverage (when it was initially reviewed). 
> I can update the test summary accordingly  -
>  **"Check if MidiSystem.getSoundbank() throws InvalidMidiDataException when 
> provided with invalid soundbank data"**
> 
> @azuev-java Your thoughts?

That and possibly rename the test because now it does not have anything to do 
with the SecurityException. Now we only check that providing an empty file 
causes the InvalidMidiDataException so EmptySoundBankTest or something to that 
extent would be a better name.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21498#discussion_r1817444639

Reply via email to