Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2012-11-08 20:59:34 +0000
committerCurtis Windatt2012-11-08 20:59:34 +0000
commitb83b13bf82f37a4a9f49847f732bc5a9f6228312 (patch)
tree4f248200cf7e4f4d118fc7b63ce81642a72b826f
parent637ebae68b9a222c33ab9ff4054fb2d3d76ea4f5 (diff)
downloadeclipse.pde.ui-b83b13bf82f37a4a9f49847f732bc5a9f6228312.tar.gz
eclipse.pde.ui-b83b13bf82f37a4a9f49847f732bc5a9f6228312.tar.xz
eclipse.pde.ui-b83b13bf82f37a4a9f49847f732bc5a9f6228312.zip
Bug 393797 - Extension point schema editor opens as read-only fromv20121108-205934
plugin.xml editor
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java
index 8135692651..8771364a13 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java
@@ -16,7 +16,6 @@ import java.io.InputStream;
import java.net.*;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.runtime.URIUtil;
import org.eclipse.pde.internal.core.PDECore;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
@@ -39,28 +38,18 @@ public class SchemaUtil {
*
* @param url URL to open connection to
* @return the url connection
- * @throws MalformedURLException if the url is null or malformed
+ * @throws MalformedURLException if the url is null
* @throws IOException if there is a problem accessing the resource specified by the url
*/
public static URLConnection getURLConnection(URL url) throws MalformedURLException, IOException {
if (url == null) {
throw new MalformedURLException("URL specified is null"); //$NON-NLS-1$
}
- // Encode the url to handle special characters by making it a URI
- URI uri;
- try {
- uri = URIUtil.toURI(url);
- URL encodedUrl = URIUtil.toURL(uri);
-
- URLConnection connection = encodedUrl.openConnection();
- if (connection instanceof JarURLConnection) {
- connection.setUseCaches(false);
- }
- return connection;
-
- } catch (URISyntaxException e) {
- throw new MalformedURLException("Unable to encode schema url: " + url); //$NON-NLS-1$
+ URLConnection connection = url.openConnection();
+ if (connection instanceof JarURLConnection) {
+ connection.setUseCaches(false);
}
+ return connection;
}
public static void parseURL(URL url, DefaultHandler handler) {

Back to the top