diff options
author | Roman Kennke <roman@kennke.org> | 2007-04-03 20:58:23 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2007-04-03 20:58:23 +0000 |
commit | 0198fbda626fcb4dbe64299c4c15901088be6f53 (patch) | |
tree | bc0a3d19deb4bc22e85fde684e3e102463aa9a07 | |
parent | 2e4fdf77fafe62e423f48bf17eade890925f12ef (diff) | |
download | classpath-0198fbda626fcb4dbe64299c4c15901088be6f53.tar.gz |
2007-04-03 Roman Kennke <roman@kennke.org>
* java/nio/ByteOrder.java
(nativeByteOrder): Let this fail when the corresponding
property is not set properly.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | java/nio/ByteOrder.java | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,11 @@ 2007-04-03 Roman Kennke <roman@kennke.org> + * java/nio/ByteOrder.java + (nativeByteOrder): Let this fail when the corresponding + property is not set properly. + +2007-04-03 Roman Kennke <roman@kennke.org> + * javax/swing/plaf/basic/BasicTreeUI.java (getPathBounds): Consider the tree's insets. Added a bunch of null checks. diff --git a/java/nio/ByteOrder.java b/java/nio/ByteOrder.java index 77cd64db0..0e3b9173e 100644 --- a/java/nio/ByteOrder.java +++ b/java/nio/ByteOrder.java @@ -61,7 +61,9 @@ public final class ByteOrder */ public static ByteOrder nativeOrder() { - return ("big".equals(System.getProperty("gnu.cpu.endian")) + // Let this fail with an NPE when the property is not set correctly. + // Otherwise we risk that NIO is silently working wrong. + return (System.getProperty("gnu.cpu.endian").equals("big") ? BIG_ENDIAN : LITTLE_ENDIAN); } |