From 02bc52037e9ccccca672d6156d9c325c74fe28b3 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Mon, 1 Jul 2024 17:27:48 -0400 Subject: 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" --- .../src/main/java/net/wotonomy/web/URI.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'projects/net.wotonomy.web/src/main/java/net/wotonomy/web/URI.java') 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. *

@@ -166,7 +163,7 @@ import sun.security.action.GetPropertyAction; * @author Sung-Gu * @version $Revision: 905 $ $Date: 2002/03/14 15:14:01 */ -class URI implements Cloneable, Comparable, Serializable { +class URI implements Cloneable, Comparable, 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 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"); -- cgit v1.2.3