From 68dfecb392dce24ed12d735a354d9f1d205deb9e Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Sun, 2 Mar 2003 20:11:13 +0000 Subject: [PATCH] 2003-03-02 Michael Koch * java/net/HttpURLConnection.java (HTTP_SERVER_ERROR): Deprecated. * java/net/MulticastSocket.java (send): Replaced checkMulticast with appropriate checkPermission call, deprecated. * java/net/URLDecoder.java (decode): Deprecated. * java/net/URLEncoder.java (encode): Deprecated. From-SVN: r63679 --- libjava/ChangeLog | 12 ++++++++++++ libjava/java/net/HttpURLConnection.java | 2 ++ libjava/java/net/MulticastSocket.java | 14 +++++++++----- libjava/java/net/URLDecoder.java | 2 ++ libjava/java/net/URLEncoder.java | 2 ++ 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2df21af4e82..9a296eacfd3 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,15 @@ +2003-03-02 Michael Koch + + * java/net/HttpURLConnection.java + (HTTP_SERVER_ERROR): Deprecated. + * java/net/MulticastSocket.java + (send): Replaced checkMulticast with appropriate checkPermission call, + deprecated. + * java/net/URLDecoder.java + (decode): Deprecated. + * java/net/URLEncoder.java + (encode): Deprecated. + 2003-03-02 Michael Koch * javax/swing/text/Caret.java diff --git a/libjava/java/net/HttpURLConnection.java b/libjava/java/net/HttpURLConnection.java index ebc0f8175f4..4cdeaf19712 100644 --- a/libjava/java/net/HttpURLConnection.java +++ b/libjava/java/net/HttpURLConnection.java @@ -242,6 +242,8 @@ public abstract class HttpURLConnection extends URLConnection /** * This error code indicates that some sort of server error occurred. + * + * @deprecated */ public static final int HTTP_SERVER_ERROR = 500; diff --git a/libjava/java/net/MulticastSocket.java b/libjava/java/net/MulticastSocket.java index dca1a85678b..481c8e356a9 100644 --- a/libjava/java/net/MulticastSocket.java +++ b/libjava/java/net/MulticastSocket.java @@ -426,17 +426,21 @@ public class MulticastSocket extends DatagramSocket * @exception IOException If an error occurs * @exception SecurityException If a security manager exists and its * checkConnect or checkMulticast method doesn't allow the operation + * + * @deprecated */ public synchronized void send(DatagramPacket p, byte ttl) throws IOException { SecurityManager s = System.getSecurityManager(); if (s != null) { - InetAddress addr = p.getAddress(); - if (addr.isMulticastAddress()) - s.checkMulticast(addr, ttl); - else - s.checkConnect(addr.getHostAddress(), p.getPort()); + InetAddress addr = p.getAddress(); + if (addr.isMulticastAddress()) + s.checkPermission (new SocketPermission + (addr.getHostName () + p.getPort (), + "accept,connect")); + else + s.checkConnect(addr.getHostAddress(), p.getPort()); } int oldttl = impl.getTimeToLive(); diff --git a/libjava/java/net/URLDecoder.java b/libjava/java/net/URLDecoder.java index 0a9067160b2..4fe77d3c933 100644 --- a/libjava/java/net/URLDecoder.java +++ b/libjava/java/net/URLDecoder.java @@ -77,6 +77,8 @@ public class URLDecoder * @param s the String to convert * * @return the converted String + * + * @deprecated */ public static String decode(String s) { diff --git a/libjava/java/net/URLEncoder.java b/libjava/java/net/URLEncoder.java index 0f106e820de..f03b8a1d8f8 100644 --- a/libjava/java/net/URLEncoder.java +++ b/libjava/java/net/URLEncoder.java @@ -71,6 +71,8 @@ public class URLEncoder * @param s The String to convert * * @return The converted String + * + * @deprecated */ public static String encode(String s) {