classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Fix DatagramSocket system property access


From: Mark Wielaard
Subject: [cp-patches] FYI: Fix DatagramSocket system property access
Date: Sun, 07 Aug 2005 22:06:07 +0200

Hi,

We were trying to get the impl.prefix system property through
System.getProperty() which is a problem when a SecurityManager is
installed. This patch fixes it by using SystemProperties.getProperty()
like the bug report suggest.

2005-08-07  Mark Wielaard  <address@hidden>

        Fixes bug #22920
        * java/net/DatagramSocket.java (DatagramSocket(SocketAddress)):
        Use gnu.classpath.SystemProperties to get impl.prefix.

Note that the ChangeLog entry/commit message mentions a bug number. If
everything works this should automatically update bugzilla for this bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22920

Committed,

Mark
Index: java/net/DatagramSocket.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/net/DatagramSocket.java,v
retrieving revision 1.45
diff -u -r1.45 DatagramSocket.java
--- java/net/DatagramSocket.java        11 Jul 2005 18:38:12 -0000      1.45
+++ java/net/DatagramSocket.java        7 Aug 2005 19:58:42 -0000
@@ -1,5 +1,5 @@
 /* DatagramSocket.java -- A class to model UDP sockets
-   Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004
+   Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
@@ -38,6 +38,8 @@
 
 package java.net;
 
+import gnu.classpath.SystemProperties;
+
 import gnu.java.net.PlainDatagramSocketImpl;
 import gnu.java.nio.DatagramChannelImpl;
 
@@ -172,7 +174,7 @@
    */
   public DatagramSocket(SocketAddress address) throws SocketException
   {
-    String propVal = System.getProperty("impl.prefix");
+    String propVal = SystemProperties.getProperty("impl.prefix");
     if (propVal == null || propVal.equals(""))
       impl = new PlainDatagramSocketImpl();
     else

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]