[kaffe] CVS kaffe (robilad): Fixed small redundancy in class library

Kaffe CVS cvs-commits at kaffe.org
Thu Jan 27 11:45:37 PST 2005


PatchSet 5932 
Date: 2005/01/27 19:39:07
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Fixed small redundancy in class library

2005-01-27  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java:
        Use gnu.java.security.action.GetPropertyAction.

        * libraries/javalib/gnu/java/net/GetSystemPropertyAction.java:
        Removed.

Members: 
	ChangeLog:1.3471->1.3472 
	libraries/javalib/Makefile.am:1.301->1.302 
	libraries/javalib/Makefile.in:1.384->1.385 
	libraries/javalib/all.files:1.83->1.84 
	libraries/javalib/gnu/java/net/GetSystemPropertyAction.java:1.1->1.2(DEAD) 
	libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3471 kaffe/ChangeLog:1.3472
--- kaffe/ChangeLog:1.3471	Thu Jan 27 16:33:26 2005
+++ kaffe/ChangeLog	Thu Jan 27 19:39:07 2005
@@ -1,5 +1,13 @@
 2005-01-27  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java:
+	Use gnu.java.security.action.GetPropertyAction.
+
+	* libraries/javalib/gnu/java/net/GetSystemPropertyAction.java:
+	Removed.
+
+2005-01-27  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/gnu/inet/util/GetSystemPropertyAction.java:
 	Removed unused class.
 
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.301 kaffe/libraries/javalib/Makefile.am:1.302
--- kaffe/libraries/javalib/Makefile.am:1.301	Thu Jan 27 16:33:29 2005
+++ kaffe/libraries/javalib/Makefile.am	Thu Jan 27 19:39:11 2005
@@ -1336,7 +1336,6 @@
 	gnu/java/net/DNSJavaInetAddressImpl.java \
 	gnu/java/net/EmptyX509TrustManager.java \
 	gnu/java/net/GetLocalHostAction.java \
-	gnu/java/net/GetSystemPropertyAction.java \
 	gnu/java/net/HeaderFieldHelper.java \
 	gnu/java/net/InetAddressImpl.java \
 	gnu/java/net/LineInputStream.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.384 kaffe/libraries/javalib/Makefile.in:1.385
--- kaffe/libraries/javalib/Makefile.in:1.384	Thu Jan 27 16:33:30 2005
+++ kaffe/libraries/javalib/Makefile.in	Thu Jan 27 19:39:12 2005
@@ -1759,7 +1759,6 @@
 	gnu/java/net/DNSJavaInetAddressImpl.java \
 	gnu/java/net/EmptyX509TrustManager.java \
 	gnu/java/net/GetLocalHostAction.java \
-	gnu/java/net/GetSystemPropertyAction.java \
 	gnu/java/net/HeaderFieldHelper.java \
 	gnu/java/net/InetAddressImpl.java \
 	gnu/java/net/LineInputStream.java \
Index: kaffe/libraries/javalib/all.files
diff -u kaffe/libraries/javalib/all.files:1.83 kaffe/libraries/javalib/all.files:1.84
--- kaffe/libraries/javalib/all.files:1.83	Thu Jan 27 16:33:31 2005
+++ kaffe/libraries/javalib/all.files	Thu Jan 27 19:39:13 2005
@@ -931,7 +931,6 @@
 gnu/java/net/DNSJavaInetAddressImpl.java
 gnu/java/net/EmptyX509TrustManager.java
 gnu/java/net/GetLocalHostAction.java
-gnu/java/net/GetSystemPropertyAction.java
 gnu/java/net/HeaderFieldHelper.java
 gnu/java/net/InetAddressImpl.java
 gnu/java/net/LineInputStream.java
===================================================================
Checking out kaffe/libraries/javalib/gnu/java/net/GetSystemPropertyAction.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/gnu/java/net/Attic/GetSystemPropertyAction.java,v
VERS: 1.1
***************
--- kaffe/libraries/javalib/gnu/java/net/GetSystemPropertyAction.java	Thu Jan 27 19:45:37 2005
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,67 +0,0 @@
-/* GetSystemPropertyAction.java --
-   Copyright (C) 2004  Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
- 
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING.  If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from
-or based on this library.  If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so.  If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-package gnu.java.net;
-
-import java.security.PrivilegedAction;
-
-/**
- * Privileged action for retrieving system properties.
- *
- * @author Chris Burdess (dog at gnu.org)
- */
-public class GetSystemPropertyAction
-  implements PrivilegedAction
-{
-  final String name;
-
-  /**
-   * Constructor.
-   * @param name the the name of the system property to retrieve
-   */
-  public GetSystemPropertyAction(String name)
-  {
-    this.name = name;
-  }
-
-  public Object run()
-  {
-    return System.getProperty(name);
-  }
-}
-
Index: kaffe/libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java:1.1 kaffe/libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java:1.2
--- kaffe/libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java:1.1	Fri Dec  3 17:44:36 2004
+++ kaffe/libraries/javalib/gnu/java/net/protocol/ftp/FTPURLConnection.java	Thu Jan 27 19:39:13 2005
@@ -39,7 +39,7 @@
 package gnu.java.net.protocol.ftp;
 
 import gnu.java.net.GetLocalHostAction;
-import gnu.java.net.GetSystemPropertyAction;
+import gnu.java.security.action.GetPropertyAction;
 
 import java.io.FileNotFoundException;
 import java.io.FilterInputStream;
@@ -113,7 +113,7 @@
     else
       {
         username = "anonymous";
-        PrivilegedAction a = new GetSystemPropertyAction("user.name");
+        PrivilegedAction a = new GetPropertyAction("user.name");
         String systemUsername =(String) AccessController.doPrivileged(a);
         a = new GetLocalHostAction();
         InetAddress localhost =(InetAddress) AccessController.doPrivileged(a);




More information about the kaffe mailing list