summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/Dialog.java
diff options
context:
space:
mode:
authorfnasser <fnasser@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-05 21:23:12 +0000
committerfnasser <fnasser@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-05 21:23:12 +0000
commitc8aaff6fad4abe062f3cce96289c32433ef34717 (patch)
treea7bf7188bf4d3cc332a904a72fb9b03ebda56906 /libjava/java/awt/Dialog.java
parent70c2647f1e8cbb06cc8004c651344ab09281a8c4 (diff)
downloadppe42-gcc-c8aaff6fad4abe062f3cce96289c32433ef34717.tar.gz
ppe42-gcc-c8aaff6fad4abe062f3cce96289c32433ef34717.zip
* java/awt/Dialog.java (constructor): Accept null title as per spec.
* java/awt/FileDialog.java (constructor): Throw exception on invalid argument as per spec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75444 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/awt/Dialog.java')
-rw-r--r--libjava/java/awt/Dialog.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/libjava/java/awt/Dialog.java b/libjava/java/awt/Dialog.java
index eee8361146a..ac2e6ed3de9 100644
--- a/libjava/java/awt/Dialog.java
+++ b/libjava/java/awt/Dialog.java
@@ -187,7 +187,8 @@ Dialog (Frame parent, String title, boolean modal, GraphicsConfiguration gc)
{
super (parent, gc);
- this.title = title;
+ // A null title is equivalent to an empty title
+ this.title = (title != null) ? title : "";
this.modal = modal;
visible = false;
@@ -254,8 +255,9 @@ public
Dialog (Dialog parent, String title, boolean modal, GraphicsConfiguration gc)
{
super (parent, parent.getGraphicsConfiguration ());
-
- this.title = title;
+
+ // A null title is equivalent to an empty title
+ this.title = (title != null) ? title : "";
this.modal = modal;
visible = false;
@@ -289,7 +291,9 @@ getTitle()
public synchronized void
setTitle(String title)
{
- this.title = title;
+ // A null title is equivalent to an empty title
+ this.title = (title != null) ? title : "";
+
if (peer != null)
{
DialogPeer d = (DialogPeer) peer;
OpenPOWER on IntegriCloud