<Sound Dev> [9] Review Request: Find and load default.sf2 as the default soundbank on Linux
Omair Majid
omajid at redhat.com
Mon Oct 26 22:08:15 UTC 2015
* Sergey Bylokhov <Sergey.Bylokhov at oracle.com> [2015-10-26 16:00]:
> On 26.10.15 21:51, Omair Majid wrote:
> >>>Sure, that makes sense. Someone else had suggested making this
> >>>information tweakable and using the sound.properties file for this makes
> >>>a lot of sense. I suppose we couldn't do this with 8, though, since the
> >>>list of supported keys in this file is frozen for 8?
> >>
> >>I suggest to make such change as a separate fix.
> >
> >Does the original patch look okay, then? Shall I go ahead and commit it
> >as is and then post separate patches to fix other things?
>
> Besides the "sound.properties" I also suggested to investigate the usage of
> exists/isFile. The whole getDefaultSoundbank() should use the one method. If
> you sure that isFile() is better then change all other usage, if you unsure
> then use exists() in the new code.
The updated webrev now uses `exists()` in the new code:
http://cr.openjdk.java.net/~omajid/webrevs/linux-default-sf2/01/
(FWIW, some existing code already uses isFile() in that class/method).
> My assumption that isFile() should be better choice.
I agree, but I would like to work on this as a separate patch. Most of
the code that calls `exists()` then proceeds to use `new
FileInputStream()` on the result, which will probably fail if it is a
directory. But it needs to be handled as an exception correctly.
Thanks,
Omair
--
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681
More information about the sound-dev
mailing list