aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/runtime
diff options
context:
space:
mode:
authorSaad Mohammad <[email protected]>2012-07-09 15:45:42 -0400
committerSaad Mohammad <[email protected]>2012-07-09 15:45:42 -0400
commit95298e2d31af5a5919b1001aaddb58ba3d172248 (patch)
tree6e1986314a4380ae93975be83049bc766ccec6d1 /netx/net/sourceforge/jnlp/runtime
parent05c526199a8603d6f06e243484da9aad7b5ac1db (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.java25
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) {