[rfc][icedtea-web] Refactor initializeResources in ResourceDownloader

Jie Kang jkang at redhat.com
Tue Feb 17 21:38:14 UTC 2015



----- Original Message -----
> Hello,
> 
> The patch looks good to me !
> 
> Only one small nit
> 
>          } finally {
> -            entry.unlock();
> +             entry.unlock();
>          }
> 
> I think you added an extra space, which is not needed.
> 
> Other than that I give it +1 from me
> Thanks for the patch.

Hello,

Mainly for records sake:

There is one more nit I have fixed with the previous patch.

+    public static boolean isConnectable(URL location) {
+        if (location.getProtocol().equals("file")) {
+            return true;
+        }
+
         try {
-            if (location.getProtocol().equals("file")) {
-                return;
-            }
-            //Checks the offline/online status of the system.
+            OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "The host of " + location.toExternalForm() + " file should be located seems down, or you are simply offline.");


This error message should be placed in the catch statement, not in the try. My bad. Message has also been altered to be easier to read. s/file should be located seems/file seems/

             InetAddress.getByName(location.getHost());
-        } catch (UnknownHostException ue) {
-            OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "The host of " + location.toExternalForm() + " file should be located seems down, or you are simply offline.");
-            JNLPRuntime.setOnlineDetected(false);
-            return;
+        } catch (UnknownHostException e) {
+            return false;
         }
-        setOnlineDetected(true);
+
+        return true;

Patch with changes attached.


Okay to push?


Regards,

> 
> Regards,
> Lukasz Dracz
> 

-- 

Jie Kang

OpenJDK Team - Software Engineering Intern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itw-res-init-refactor-3.patch
Type: text/x-patch
Size: 10639 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20150217/3728cb43/itw-res-init-refactor-3-0001.patch>


More information about the distro-pkg-dev mailing list