Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpwalker2005-01-25 21:14:52 +0000
committerpwalker2005-01-25 21:14:52 +0000
commit1985c0592e71de032e94289a6dcd3ab21e829fad (patch)
treea3a32101eb6003e51f3651325cab9658c6c7a8d3 /plugins
parentd9edac60e1da2ed4f22aea2ac53e2feca80f00b9 (diff)
downloadwebtools.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.java29
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.

Back to the top