[rfc][icedtea-web] net.sourceforge.jnlp.ResourcesTest fix
Andrew Azores
aazores at redhat.com
Mon Sep 16 07:15:27 PDT 2013
On 09/13/2013 04:00 PM, Omair Majid wrote:
> On 09/13/2013 02:46 PM, Andrew Azores wrote:
>> Renamed some variables and removed an assertion that the user plugin
>> directory (~/.mozilla/plugins) must exist, as it may not
> Thanks for doing the cleanup. The code is so much more readable now!
>
> If your IDE has refactoring support, please use that instead of renaming
> things manually.
nnoremap gr gd[{V%:s/<C-R>///gc<left><left><left>
Now it has refactoring support ;)
>
>> - if (f2 != null) {
>> - Assert.assertTrue("browser's users-plugins location should exist " + f2.toString() + " for " + browser.getID().toString(), f2.exists());
> Please move the comment below about no user-plugins directory to here.
>
>> - File[] ff1 = new File[0];
>> - if (f1 != null) {
>> - ff1 = f1.listFiles();
>> + File[] defaultPlugins = new File[0];
>> + if (defaultPlugins != null) {
>> + defaultPlugins = defaultPluginDir.listFiles();
>> }
> This looks like a mistake. It should be `if (defaultPluginDir != null)`,
> right?
Ah, yes. Thanks.
>> - File[] ff2 = new File[0];
>> - if (f2 != null) {
>> - ff2 = f2.listFiles();
>> + File[] userPlugins = null;
>> + if (userPluginDir != null) {
>> + userPlugins = userPluginDir.listFiles();
>> }
>> + if (userPlugins == null) {
>> + userPlugins = new File[0];
>> + }
> Why not use the idiom used in defaultPlugins and declare and initialize
> userPlugins to new File[0] at once?
Yea actually this is pretty hacky. userPluginDir doesn't necessarily
exist, and if it doesn't, then calling listFiles on it returns null.
I've cleaned that up now.
>
> Cheers,
> Omair
>
Thanks,
--
Andrew A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ResourcesTest.patch
Type: text/x-patch
Size: 7045 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130916/0306d385/ResourcesTest.patch
More information about the distro-pkg-dev
mailing list