diff options
author | Mark Wielaard <mark@klomp.org> | 2006-01-13 13:17:12 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2006-01-13 13:17:12 +0000 |
commit | f1d78899f535230bad6d05ba8ef4761495b1349e (patch) | |
tree | 9a5c024926fb0b86c359b63c6de28292a6f3d3fa /gnu/java | |
parent | e2880df85352a4f46c1fc8b28c4cd08540a2daed (diff) | |
download | classpath-f1d78899f535230bad6d05ba8ef4761495b1349e.tar.gz |
* Update to classpath-0_20-release minus:
- java/beans/EventSetDescriptor.java
- java/util/Hashtable.java
Diffstat (limited to 'gnu/java')
-rw-r--r-- | gnu/java/awt/peer/gtk/GdkGraphics2D.java | 13 | ||||
-rw-r--r-- | gnu/java/nio/channels/FileChannelImpl.java | 6 | ||||
-rw-r--r-- | gnu/java/nio/charset/Provider.java | 15 | ||||
-rw-r--r-- | gnu/java/nio/charset/iconv/IconvProvider.java | 15 | ||||
-rw-r--r-- | gnu/java/rmi/server/UnicastRef.java | 3 |
5 files changed, 26 insertions, 26 deletions
diff --git a/gnu/java/awt/peer/gtk/GdkGraphics2D.java b/gnu/java/awt/peer/gtk/GdkGraphics2D.java index d07820a97..195304dce 100644 --- a/gnu/java/awt/peer/gtk/GdkGraphics2D.java +++ b/gnu/java/awt/peer/gtk/GdkGraphics2D.java @@ -180,11 +180,14 @@ public class GdkGraphics2D extends Graphics2D else fg = new Color(g.fg.getRGB()); - if (g.bg.getAlpha() != -1) - bg = new Color(g.bg.getRed(), g.bg.getGreen(), g.bg.getBlue(), - g.bg.getAlpha()); - else - bg = new Color(g.bg.getRGB()); + if (g.bg != null) + { + if (g.bg.getAlpha() != -1) + bg = new Color(g.bg.getRed(), g.bg.getGreen(), g.bg.getBlue(), + g.bg.getAlpha()); + else + bg = new Color(g.bg.getRGB()); + } if (g.clip == null) clip = null; diff --git a/gnu/java/nio/channels/FileChannelImpl.java b/gnu/java/nio/channels/FileChannelImpl.java index 466f3dd55..a557c7d3b 100644 --- a/gnu/java/nio/channels/FileChannelImpl.java +++ b/gnu/java/nio/channels/FileChannelImpl.java @@ -1,5 +1,5 @@ /* FileChannelImpl.java -- - Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -301,8 +301,10 @@ public final class FileChannelImpl extends FileChannel else if (mode == MapMode.READ_WRITE || mode == MapMode.PRIVATE) { nmode = mode == MapMode.READ_WRITE ? '+' : 'c'; - if ((this.mode & (READ|WRITE)) != (READ|WRITE)) + if ((this.mode & WRITE) != WRITE) throw new NonWritableChannelException(); + if ((this.mode & READ) != READ) + throw new NonReadableChannelException(); } else throw new IllegalArgumentException ("mode: " + mode); diff --git a/gnu/java/nio/charset/Provider.java b/gnu/java/nio/charset/Provider.java index c7f7ed278..01c2650a8 100644 --- a/gnu/java/nio/charset/Provider.java +++ b/gnu/java/nio/charset/Provider.java @@ -1,5 +1,5 @@ /* Provider.java -- - Copyright (C) 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,6 +49,11 @@ import java.util.Iterator; * Charset provider for the required charsets. Used by * {@link Charset#charsetForName} and * {@link Charset#availableCharsets}. * + * Note: This class is a privileged class, because it can be instantiated without + * requiring the RuntimePermission("charsetProvider"). There is a check in + * java.nio.charset.spi.CharsetProvider to skip the security check if the provider + * is an instance of this class. + * * @author Jesse Rosenstock * @author Robert Schuster (thebohemian@gmx.net) * @see Charset @@ -57,14 +62,6 @@ public final class Provider extends CharsetProvider { private static Provider singleton; - static - { - synchronized (Provider.class) - { - singleton = null; - } - } - /** * Map from charset name to charset canonical name. The strings * are all lower-case to allow case-insensitive retrieval of diff --git a/gnu/java/nio/charset/iconv/IconvProvider.java b/gnu/java/nio/charset/iconv/IconvProvider.java index 873e9ecda..6fd8b7440 100644 --- a/gnu/java/nio/charset/iconv/IconvProvider.java +++ b/gnu/java/nio/charset/iconv/IconvProvider.java @@ -1,5 +1,5 @@ /* IconvProvider.java -- - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,20 +48,17 @@ import java.util.Vector; /** * Charset provider wrapping iconv. * + * Note: This class is a privileged class, because it can be instantiated without + * requiring the RuntimePermission("charsetProvider"). There is a check in + * java.nio.charset.spi.CharsetProvider to skip the security check if the provider + * is an instance of this class. + * * @author Sven de Marothy */ public final class IconvProvider extends CharsetProvider { private static IconvProvider singleton; - static - { - synchronized (IconvProvider.class) - { - singleton = null; - } - } - // Declaring the construtor public may violate the use of singleton. // But it must be public so that an instance of this class can be // created by Class.newInstance(), which is the case when this provider is diff --git a/gnu/java/rmi/server/UnicastRef.java b/gnu/java/rmi/server/UnicastRef.java index c1b871fb8..8097a0466 100644 --- a/gnu/java/rmi/server/UnicastRef.java +++ b/gnu/java/rmi/server/UnicastRef.java @@ -47,6 +47,7 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.rmi.ConnectException; import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.server.ObjID; @@ -195,7 +196,7 @@ public RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash conn = manager.getConnection(); } catch (IOException e1) { - throw new RemoteException("connection failed to host: " + manager.serverName, e1); + throw new ConnectException("connection failed to host: " + manager.serverName, e1); } //obj: useless? |