Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.core.net/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/WindowsProxyProvider.java28
2 files changed, 23 insertions, 7 deletions
diff --git a/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF
index 489b3cfb8..3d0c0ec29 100644
--- a/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.core.net;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.100.qualifier
Bundle-Activator: org.eclipse.core.internal.net.Activator
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/WindowsProxyProvider.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/WindowsProxyProvider.java
index 65d226698..aec448954 100644
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/WindowsProxyProvider.java
+++ b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/WindowsProxyProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 compeople AG and others.
+ * Copyright (c) 2008, 2009 compeople AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,12 +19,15 @@ import org.eclipse.core.net.proxy.IProxyData;
public class WindowsProxyProvider extends AbstractProxyProvider {
private static final String LIBRARY_NAME = "jWinHttp-1.0.0"; //$NON-NLS-1$
-
+
+ private static boolean jWinHttpLoaded = false;
+
static {
try {
System.loadLibrary(LIBRARY_NAME);
if (Policy.DEBUG_SYSTEM_PROVIDERS)
Policy.debug("Loaded " + LIBRARY_NAME + " library"); //$NON-NLS-1$ //$NON-NLS-2$
+ jWinHttpLoaded = true;
} catch (final UnsatisfiedLinkError e) {
Activator.logError(
"Could not load library: " + System.mapLibraryName(LIBRARY_NAME), e); //$NON-NLS-1$
@@ -34,19 +37,32 @@ public class WindowsProxyProvider extends AbstractProxyProvider {
private WinHttpProxyProvider winHttpProxyProvider;
public WindowsProxyProvider() {
- winHttpProxyProvider = new WinHttpProxyProvider();
+ if (jWinHttpLoaded) {
+ winHttpProxyProvider = new WinHttpProxyProvider();
+ } else {
+ winHttpProxyProvider = null;
+ }
}
protected IProxyData[] getProxyData(URI uri) {
- return winHttpProxyProvider.getProxyData(uri);
+ if (jWinHttpLoaded) {
+ return winHttpProxyProvider.getProxyData(uri);
+ }
+ return new IProxyData[0];
}
protected IProxyData[] getProxyData() {
- return winHttpProxyProvider.getProxyData();
+ if (jWinHttpLoaded) {
+ return winHttpProxyProvider.getProxyData();
+ }
+ return new IProxyData[0];
}
protected String[] getNonProxiedHosts() {
- return winHttpProxyProvider.getNonProxiedHosts();
+ if (jWinHttpLoaded) {
+ return winHttpProxyProvider.getNonProxiedHosts();
+ }
+ return new String[0];
}
}

Back to the top