src/java.xml/share/classes/javax/xml/catalog/BaseEntry.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -22,17 +22,13 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.catalog;
-import java.io.File;
import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.Objects;
-import jdk.xml.internal.SecuritySupport;
/**
* Represents a general Catalog entry.
*
* @since 9
@@ -236,33 +232,21 @@
}
return url;
}
/**
- * Replace backslashes with forward slashes. (URLs always use forward
- * slashes.)
- *
- * @param sysid The input system identifier.
- * @return The same system identifier with backslashes turned into forward
- * slashes.
- */
- protected String fixSlashes(String sysid) {
- return sysid.replace('\\', '/');
- }
-
- /**
* Construct an absolute URI from a relative one, using the current base
* URI.
*
* @param sysid The (possibly relative) system identifier
* @return The system identifier made absolute with respect to the current
* {@link #base}.
*/
protected String makeAbsolute(String sysid) {
URL local = null;
- sysid = fixSlashes(sysid);
+ sysid = Util.fixSlashes(sysid);
/**
* try { local = new URL(base, sysid); } catch (MalformedURLException e)
* { catalogManager.debug.message(1, "Malformed URL on system
* identifier", sysid); }
*/