[RFC][icedtea-web][JarCertVerifier Update] Remove/update useless variables
Danesh Dadachanji
ddadacha at redhat.com
Thu Apr 5 13:50:56 PDT 2012
Hi,
When going through updates for JarCertVerifier, I stumbled across these to variables that don't serve much purpose. The two ArrayLists,
verifiedJars and unverifiedJars contain the jars passed into JarCertVerifier that are either verified or unverified. However, the
lists' contents are never read, except for in allJarsSigned().
To clarify, verifiedJars is never touched apart from declaration and adding contents so I propose we remove its unnecessary code
altogether. Secondly, apart from initialization and adding contents, unverifiedJars is only read by the method mentioned above to check
its size, let alone examine its contents. Since this is the case, an integer be a better fit for this variable. The attached patch does
this.
I could not find them being read anywhere outside of JarCertVerifier so I think these changes should be acceptable. What does everyone
else think?
ChangeLog:
+2012-04-05 Danesh Dadachanji <ddadacha at redhat.com>
+
+ Update useless variables in JarCertVerifier.
+ * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java:
+ Removed verifiedJars list, renamed unverifiedJars to numUnverifiedJars
+ and changed its type to int instead of ArrayList.
+
Cheers,
Danesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-useless-vars-in-jar-cert-verifier-01.patch
Type: text/x-patch
Size: 2129 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120405/891a8e12/remove-useless-vars-in-jar-cert-verifier-01.patch
More information about the distro-pkg-dev
mailing list