diff options
author | Saad Mohammad <[email protected]> | 2012-07-09 15:45:42 -0400 |
---|---|---|
committer | Saad Mohammad <[email protected]> | 2012-07-09 15:45:42 -0400 |
commit | 95298e2d31af5a5919b1001aaddb58ba3d172248 (patch) | |
tree | 6e1986314a4380ae93975be83049bc766ccec6d1 /netx/net/sourceforge/jnlp/runtime | |
parent | 05c526199a8603d6f06e243484da9aad7b5ac1db (diff) |
Minor cleanup that removes avoidable code from loop.
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime')
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java index a6649fd..83ffcb5 100644 --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java @@ -433,23 +433,22 @@ public class JNLPClassLoader extends URLClassLoader { 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) { |