/hg/icedtea-web: Minor cleanup that removes avoidable code from ...
smohammad at icedtea.classpath.org
smohammad at icedtea.classpath.org
Mon Jul 9 12:46:07 PDT 2012
changeset 13ca1c870b92 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=13ca1c870b92
author: Saad Mohammad <smohammad at redhat.com>
date: Mon Jul 09 15:45:42 2012 -0400
Minor cleanup that removes avoidable code from loop.
diffstat:
ChangeLog | 5 +++
netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 25 ++++++++---------
2 files changed, 17 insertions(+), 13 deletions(-)
diffs (51 lines):
diff -r 0e3c3f0aeb1f -r 13ca1c870b92 ChangeLog
--- a/ChangeLog Mon Jul 09 14:50:22 2012 -0400
+++ b/ChangeLog Mon Jul 09 15:45:42 2012 -0400
@@ -1,3 +1,8 @@
+2012-07-09 Saad Mohammad <smohammad at redhat.com>
+
+ * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeExtensions):
+ Checks and assigns the main-class name prior to the for loop.
+
2012-07-09 Martin Olsson <martin at minimum.se>
* plugin/icedteanp/IcedTeaPluginUtils.cc: Change calls from g_free
diff -r 0e3c3f0aeb1f -r 13ca1c870b92 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Jul 09 14:50:22 2012 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Jul 09 15:45:42 2012 -0400
@@ -433,23 +433,22 @@
loaderList.add(this);
+ if (mainClass == null) {
+ Object obj = file.getLaunchInfo();
+
+ if (obj instanceof ApplicationDesc) {
+ ApplicationDesc ad = (ApplicationDesc) file.getLaunchInfo();
+ mainClass = ad.getMainClass();
+ } else if (obj instanceof AppletDesc) {
+ AppletDesc ad = (AppletDesc) file.getLaunchInfo();
+ mainClass = ad.getMainClass();
+ }
+ }
+
//if (ext != null) {
for (int i = 0; i < ext.length; i++) {
try {
String uniqueKey = this.getJNLPFile().getUniqueKey();
-
- if (mainClass == null) {
- Object obj = file.getLaunchInfo();
-
- if (obj instanceof ApplicationDesc) {
- ApplicationDesc ad = (ApplicationDesc) file.getLaunchInfo();
- mainClass = ad.getMainClass();
- } else if (obj instanceof AppletDesc) {
- AppletDesc ad = (AppletDesc) file.getLaunchInfo();
- mainClass = ad.getMainClass();
- }
- }
-
JNLPClassLoader loader = getInstance(ext[i].getLocation(), uniqueKey, ext[i].getVersion(), updatePolicy, mainClass);
loaderList.add(loader);
} catch (Exception ex) {
More information about the distro-pkg-dev
mailing list