Hi,

I checked in the attached patch to fix PrintStream to use
SystemProperties (to make sure we don't request unneeded security
permissions).

Regards,
Jeroen

2005-01-13  Jeroen Frijters  <[EMAIL PROTECTED]>

        * java/io/PrintStream.java
        (line_separator, PrintStream(OutputStream,boolean)): Use
        SystemProperties.
Index: java/io/PrintStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/PrintStream.java,v
retrieving revision 1.25
diff -u -r1.25 PrintStream.java
--- java/io/PrintStream.java    2 Jul 2005 20:32:38 -0000       1.25
+++ java/io/PrintStream.java    12 Jan 2006 20:19:18 -0000
@@ -1,5 +1,6 @@
 /* PrintStream.java -- OutputStream for printing output
-   Copyright (C) 1998, 1999, 2001, 2003, 2004, 2005  Free Software Foundation, 
Inc.
+   Copyright (C) 1998, 1999, 2001, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -38,6 +39,8 @@
 
 package java.io;
 
+import gnu.classpath.SystemProperties;
+
 /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
  * "The Java Language Specification", ISBN 0-201-63451-1
  * Status:  Believed complete and correct to 1.3
@@ -64,7 +67,7 @@
 
   // Line separator string.
   private static final char[] line_separator
-    = System.getProperty("line.separator").toCharArray();
+    = SystemProperties.getProperty("line.separator").toCharArray();
 
   /**
    *  Encoding name
@@ -112,7 +115,7 @@
     super (out);
 
     try {
-       this.encoding = System.getProperty("file.encoding");
+       this.encoding = SystemProperties.getProperty("file.encoding");
     } catch (SecurityException e){
        this.encoding = "ISO8859_1";
     } catch (IllegalArgumentException e){
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to