From ee141b882274c83730b641028543aaa2ca59dcc4 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Mon, 25 Apr 2005 19:48:35 +0000 Subject: [multiple changes] 2005-04-25 Archie Cobbs * java/lang/Throwable.java: simplify initializing cause in constructor 2005-04-25 Michael Koch * gnu/classpath/SystemProperties.java: New file. * gnu/classpath/natSystemProperties.cc: New file. * java/lang/Runtime.java (defaultProperties): Removed. (static): Likewise. (): Made thrown exceptions more verbose. (insertSystemProperties): Removed. * java/lang/System.java (static): Likewise. (properties): Likewise. (setSecurityManager): Reordered modifiers. (getenv): Improved javadoc. (): Likewise. (isWordsBigEndian): Removed. * java/lang/natRuntime.cc (_Jv_SetDLLSearchPath): Likewise. (file_encoding): Likewise. (default_file_encoding): Likewise. (getpwuid_adaptor): Likewise. (insertSystemProperties): Likewise. * java/lang/natSystem.cc (isWordsBigEndian): Likewise. * Makefile.am (ordinary_java_source_files): Added gnu/classpath/SystemProperties.java. (nat_source_files): Added gnu/classpath/natSystemProperties.cc. * Makefile.in: Regenerated. From-SVN: r98734 --- libjava/java/lang/Throwable.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'libjava/java/lang/Throwable.java') diff --git a/libjava/java/lang/Throwable.java b/libjava/java/lang/Throwable.java index ad5157823f5..d69b543141b 100644 --- a/libjava/java/lang/Throwable.java +++ b/libjava/java/lang/Throwable.java @@ -37,6 +37,8 @@ exception statement from your version. */ package java.lang; +import gnu.classpath.SystemProperties; + import java.io.PrintStream; import java.io.PrintWriter; import java.io.Serializable; @@ -170,7 +172,7 @@ public class Throwable implements Serializable public Throwable(String message, Throwable cause) { this(message); - initCause(cause); + this.cause = cause; } /** @@ -401,13 +403,7 @@ public class Throwable implements Serializable */ private static class StaticData { - static final String nl; - - static - { - // Access package private properties field to prevent Security check. - nl = System.properties.getProperty("line.separator"); - } + static final String nl = SystemProperties.getProperty("line.separator"); } // Create whole stack trace in a stringbuffer so we don't have to print -- cgit v1.2.3