diff options
author | pwalker | 2005-01-25 21:14:52 +0000 |
---|---|---|
committer | pwalker | 2005-01-25 21:14:52 +0000 |
commit | 1985c0592e71de032e94289a6dcd3ab21e829fad (patch) | |
tree | a3a32101eb6003e51f3651325cab9658c6c7a8d3 /plugins | |
parent | d9edac60e1da2ed4f22aea2ac53e2feca80f00b9 (diff) | |
download | webtools.javaee-1985c0592e71de032e94289a6dcd3ab21e829fad.tar.gz webtools.javaee-1985c0592e71de032e94289a6dcd3ab21e829fad.tar.xz webtools.javaee-1985c0592e71de032e94289a6dcd3ab21e829fad.zip |
61944 [perf] - removed verifyFound method - will help eliminate unnecessary calls during dev time
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java index 5e60c20e7..0ebf84c6c 100644 --- a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java +++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java @@ -11,7 +11,7 @@ package org.eclipse.jem.internal.proxy.core; /* * $RCSfile: ProxyPlugin.java,v $ - * $Revision: 1.38 $ $Date: 2005/01/25 16:14:38 $ + * $Revision: 1.39 $ $Date: 2005/01/25 21:14:52 $ */ @@ -315,9 +315,8 @@ public class ProxyPlugin extends Plugin { public URL urlLocalizeFromBundle(Bundle bundle, IPath filenameWithinBundle) { try { URL pvm = Platform.find(bundle, filenameWithinBundle); - pvm = verifyFound(pvm); if (pvm != null) - return pvm; + return Platform.asLocalURL(pvm); } catch (IOException e) { } @@ -327,36 +326,14 @@ public class ProxyPlugin extends Plugin { protected URL urlLocalizeFromBundleOnly(Bundle bundle, String filenameWithinBundle) { try { URL pvm = bundle.getEntry(filenameWithinBundle); - pvm = verifyFound(pvm); if (pvm != null) - return pvm; + return Platform.asLocalURL(pvm); } catch (IOException e) { } return findDev(bundle, filenameWithinBundle); } - private URL verifyFound(URL pvm) throws IOException { - if (pvm != null) - pvm = Platform.asLocalURL(pvm); - if (devMode) { - // Need to test if found in devmode. Otherwise we will just assume it is found. If not found on remote and moved to cache, an IOException would be thrown. - if (pvm != null) { - InputStream ios = null; - try { - ios = pvm.openStream(); - if (ios != null) - return pvm; // Found it, so return it. - } finally { - if (ios != null) - ios.close(); - } - } - } else - return pvm; - return null; - } - private URL findDev(Bundle bundle, String filenameWithinBundle) { if (devMode) { // Got this far and in dev mode means it wasn't found, so we'll try for development style. |