diff options
| author | Benjamin Culkin <scorpress@gmail.com> | 2024-07-01 17:27:48 -0400 |
|---|---|---|
| committer | Benjamin Culkin <scorpress@gmail.com> | 2024-07-01 17:27:48 -0400 |
| commit | 02bc52037e9ccccca672d6156d9c325c74fe28b3 (patch) | |
| tree | db022b83c90562f461f4a27412caa9936a8dfd04 /projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java | |
| parent | c75d7dbd613a47b217499f7a856c469a8bc59e2a (diff) | |
Update a whole bunch of things
Yeah... not a great commit message. t.b.h, I could maybe've split the
commit into more parts; but that would be quite a lot off effort and
would have a pretty decent chance of at least one of the commits leaving
the repository in a non-working state.
For the future, will want to try and commit more often so there aren't
these mega-commits where it's just "a whole bunch of stuff changed"
Diffstat (limited to 'projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java')
| -rw-r--r-- | projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java index ba608a4..99716bf 100644 --- a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java +++ b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java @@ -70,16 +70,13 @@ import java.io.IOException; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.net.URL; -import java.security.AccessController; import java.util.BitSet; import java.util.Hashtable; import java.util.Locale; -import sun.security.action.GetPropertyAction; - /** * The interface for the URI(Uniform Resource Identifiers) version of RFC 2396. - * This class has the purpose of supportting of parsing a URI reference to + * This class has the purpose of supporting of parsing a URI reference to * extend any specific protocols, the character encoding of the protocol to be * transported and the charset of the document. * <p> @@ -166,7 +163,7 @@ import sun.security.action.GetPropertyAction; * @author <a href="mailto:jericho@apache.org">Sung-Gu</a> * @version $Revision: 905 $ $Date: 2002/03/14 15:14:01 */ -class URI implements Cloneable, Comparable, Serializable { +class URI implements Cloneable, Comparable<URI>, Serializable { // ----------------------------------------------------------- Constructors @@ -571,7 +568,7 @@ class URI implements Cloneable, Comparable, Serializable { // in order to support backward compatiblity _documentCharset = LocaleToCharsetMap.getCharset(locale); } else { - _documentCharset = (String) AccessController.doPrivileged(new GetPropertyAction("file.encoding")); + _documentCharset = "UTF-8"; //(String) AccessController.doPrivileged(new GetPropertyAction("file.encoding")); } } @@ -3459,9 +3456,7 @@ class URI implements Cloneable, Comparable, Serializable { * @exception ClassCastException not URI argument * @throws NullPointerException null object */ - public int compareTo(Object obj) { - - URI another = (URI) obj; + public int compareTo(URI another) { if (!equals(_authority, another.getRawAuthority())) return -1; return toString().compareTo(another.toString()); @@ -3582,9 +3577,9 @@ class URI implements Cloneable, Comparable, Serializable { */ public static class LocaleToCharsetMap { - private static Hashtable map; + private static Hashtable<String, String> map; static { - map = new Hashtable(); + map = new Hashtable<>(); map.put("ar", "ISO-8859-6"); map.put("be", "ISO-8859-5"); map.put("bg", "ISO-8859-5"); |
