/hg/icedtea-web: Properly disconnect all connected http connecti...

Omair Majid omajid at redhat.com
Fri May 9 21:55:54 UTC 2014


* jvanek at icedtea.classpath.org <jvanek at icedtea.classpath.org> [2014-05-05 09:41]:
> changeset e8b21e10ead6 in /hg/icedtea-web
> details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e8b21e10ead6
> author: Jiri Vanek <jvanek at redhat.com>
> date: Mon May 05 15:38:16 2014 +0200
> 
> 	Properly disconnect all connected http connections.

When you are fixing code, please adjust surrounding code too.
IcedTea-Web is written in a style that spreads information around and
leaving obsolete information is really bad in the long term.

> diff -r 8012d1bbbe72 -r e8b21e10ead6 netx/net/sourceforge/jnlp/cache/CacheEntry.java
> --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java	Fri May 02 19:11:11 2014 -0400
> +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java	Mon May 05 15:38:16 2014 +0200
> @@ -82,6 +82,7 @@
>      /**
>       * Returns the time in the local system clock that the file was
>       * most recently checked for an update.
> +     * @return 

Please don't add comments like this. They are useless.

>      /**
>       * Sets the time in the local system clock that the file was
>       * most recently checked for an update.
> +     * @param updatedTime

Ditto.

>       * the cache and it is up to date.  This method may not return
>       * immediately.

This comment is now wrong too. Please remove/adjust it.

> -     * @param connection a connection to the remote URL
> +     * @param lastModified

:(

>          try {
> -            long remoteModified = connection.getLastModified();
> +            long remoteModified = lastModified;
>              long cachedModified = Long.parseLong(properties.getProperty("last-modified"));
>  
>              if (remoteModified > 0 && remoteModified <= cachedModified)

A few lines below this, there is some code in the file that is now
misleading:

>  } catch (Exception ex) {
>      OutputController.getLogger().log(ex);;                    
>
>      return cached; // if can't connect return whether already in cache  

Please fix this. 

> +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java	Mon May 05 15:38:16 2014 +0200

> +     * @param location
> +     * @param version
> +     * @return 
>       */
>      public static Permission getReadPermission(URL location, Version version) {

There are lots of similar empty @param's in this changeset. Please fix them
all.

Thanks,
Omair

-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the distro-pkg-dev mailing list