summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTania Bento <tbento@redhat.com>2006-12-06 15:18:59 +0000
committerTania Bento <tbento@redhat.com>2006-12-06 15:18:59 +0000
commit71c112823abe2e15cdf8dbc25f9e420553a31252 (patch)
treed7babcaabc420c7701248e8f73cada4b1906f0dd
parentb35f3c499505dff724bb6e1e7d2d001cb956b0ac (diff)
downloadclasspath-71c112823abe2e15cdf8dbc25f9e420553a31252.tar.gz
2006-12-06 Tania Bento <tbento@redhat.com>
* javax/swing/border/CompoundBorder.java: (isBorderOpaque): If inside and outside border both have a null value, return true.
-rw-r--r--ChangeLog6
-rw-r--r--javax/swing/border/CompoundBorder.java7
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ca8accac..7235a4547 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-12-06 Tania Bento <tbento@redhat.com>
+
+ * javax/swing/border/CompoundBorder.java:
+ (isBorderOpaque): If inside and outside border both have a null
+ value, return true.
+
2006-12-06 Chris Burdess <dog@gnu.org>
Fixes PR 29272.
diff --git a/javax/swing/border/CompoundBorder.java b/javax/swing/border/CompoundBorder.java
index 2ee639cf9..63a9a553d 100644
--- a/javax/swing/border/CompoundBorder.java
+++ b/javax/swing/border/CompoundBorder.java
@@ -115,6 +115,13 @@ public class CompoundBorder extends AbstractBorder
*/
public boolean isBorderOpaque()
{
+ // Although the API specification states that this method
+ // returns true if both the inside and outside borders are non-null
+ // and opaque, and false otherwise, a mauve test shows that if both
+ // the inside or outside borders are null, then true is returned.
+ if ((insideBorder == null) && (outsideBorder == null))
+ return true;
+
// While it would be safe to assume true for the opacity of
// a null border, this behavior would not be according to
// the API specification. Also, it is pathological to have