diff options
Diffstat (limited to 'netx/net/sourceforge/jnlp/util')
-rw-r--r-- | netx/net/sourceforge/jnlp/util/FileUtils.java | 2 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/util/PropertiesFile.java | 8 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/util/Reflect.java | 13 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/util/WeakList.java | 9 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/util/XDesktopEntry.java | 2 |
5 files changed, 11 insertions, 23 deletions
diff --git a/netx/net/sourceforge/jnlp/util/FileUtils.java b/netx/net/sourceforge/jnlp/util/FileUtils.java index b006424..51081ed 100644 --- a/netx/net/sourceforge/jnlp/util/FileUtils.java +++ b/netx/net/sourceforge/jnlp/util/FileUtils.java @@ -192,7 +192,7 @@ public final class FileUtils { return path.substring(path.length() - visibleChars); } - int affixLength = (visibleChars - OMITTED_LENGTH)/2; + int affixLength = (visibleChars - OMITTED_LENGTH) / 2; String prefix = path.substring(0, affixLength); String suffix = path.substring(path.length() - affixLength); diff --git a/netx/net/sourceforge/jnlp/util/PropertiesFile.java b/netx/net/sourceforge/jnlp/util/PropertiesFile.java index 80a7ec2..6cdfd59 100644 --- a/netx/net/sourceforge/jnlp/util/PropertiesFile.java +++ b/netx/net/sourceforge/jnlp/util/PropertiesFile.java @@ -14,7 +14,6 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - package net.sourceforge.jnlp.util; import java.io.*; @@ -45,7 +44,6 @@ public class PropertiesFile extends Properties { /** lazy loaded on getProperty */ boolean loaded = false; - /** * Create a properties object backed by the specified file. * @@ -121,8 +119,7 @@ public class PropertiesFile extends Properties { InputStream s = new FileInputStream(file); load(s); - } - catch (IOException ex) { + } catch (IOException ex) { // eat } } @@ -137,8 +134,7 @@ public class PropertiesFile extends Properties { try { OutputStream s = new FileOutputStream(file); store(s, header); - } - catch (IOException ex) { + } catch (IOException ex) { // eat } } diff --git a/netx/net/sourceforge/jnlp/util/Reflect.java b/netx/net/sourceforge/jnlp/util/Reflect.java index 2b1301c..5f40629 100644 --- a/netx/net/sourceforge/jnlp/util/Reflect.java +++ b/netx/net/sourceforge/jnlp/util/Reflect.java @@ -19,7 +19,6 @@ package net.sourceforge.jnlp.util; import java.util.*; import java.lang.reflect.*; - /** * Provides simply, convenient methods to invoke methods by * name. This class is used to consolidate reflection needed to @@ -48,7 +47,6 @@ public class Reflect { private static Object zero[] = new Object[0]; - /** * Create a new Reflect instance. */ @@ -84,8 +82,7 @@ public class Reflect { m.setAccessible(accessible); return m.invoke(null, args); - } - catch (Exception ex) { // eat + } catch (Exception ex) { // eat return null; } } @@ -110,8 +107,7 @@ public class Reflect { m.setAccessible(accessible); return m.invoke(object, args); - } - catch (Exception ex) { // eat + } catch (Exception ex) { // eat ex.printStackTrace(); return null; } @@ -126,7 +122,7 @@ public class Reflect { for (Class c = type; c != null; c = c.getSuperclass()) { Method methods[] = c.getMethods(); - for (int i=0; i < methods.length; i++) { + for (int i = 0; i < methods.length; i++) { if (methods[i].getName().equals(method)) { Class parameters[] = methods[i].getParameterTypes(); @@ -135,8 +131,7 @@ public class Reflect { } } } - } - catch (Exception ex) { // eat + } catch (Exception ex) { // eat ex.printStackTrace(); } diff --git a/netx/net/sourceforge/jnlp/util/WeakList.java b/netx/net/sourceforge/jnlp/util/WeakList.java index 85204b1..66dab40 100644 --- a/netx/net/sourceforge/jnlp/util/WeakList.java +++ b/netx/net/sourceforge/jnlp/util/WeakList.java @@ -14,13 +14,11 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - package net.sourceforge.jnlp.util; import java.lang.ref.*; import java.util.*; - /** * This list stores objects automatically using weak references. * Objects are added and removed from the list as normal, but may @@ -37,7 +35,6 @@ public class WeakList<E> extends AbstractList<E> { /* list of weak references */ private ArrayList<WeakReference<E>> refs = new ArrayList<WeakReference<E>>(); - /** * Create a weak random-access list. */ @@ -103,7 +100,7 @@ public class WeakList<E> extends AbstractList<E> { public List<E> hardList() { List<E> result = new ArrayList<E>(); - for (int i=0; i < size(); i++) { + for (int i = 0; i < size(); i++) { E tmp = get(i); if (tmp != null) @@ -118,8 +115,8 @@ public class WeakList<E> extends AbstractList<E> { * objects. */ public void trimToSize() { - for (int i=size(); i-->0;) - if (get(i)==null) + for (int i = size(); i-- > 0;) + if (get(i) == null) remove(i); } diff --git a/netx/net/sourceforge/jnlp/util/XDesktopEntry.java b/netx/net/sourceforge/jnlp/util/XDesktopEntry.java index eae4146..06dff37 100644 --- a/netx/net/sourceforge/jnlp/util/XDesktopEntry.java +++ b/netx/net/sourceforge/jnlp/util/XDesktopEntry.java @@ -75,7 +75,7 @@ public class XDesktopEntry { String pathToJavaws = System.getProperty("java.home") + File.separator + "bin" + File.separator + "javaws"; String cacheDir = JNLPRuntime.getConfiguration() - .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR); + .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR); File cacheFile = CacheUtil.urlToPath(file.getSourceLocation(), cacheDir); String fileContents = "[Desktop Entry]\n"; |