summaryrefslogtreecommitdiff
path: root/java/beans
diff options
context:
space:
mode:
authorRobert Schuster <theBohemian@gmx.net>2005-04-28 20:06:49 +0000
committerRobert Schuster <theBohemian@gmx.net>2005-04-28 20:06:49 +0000
commitd8903d4706ec6b45adfa89e1df9fc94b3055c74a (patch)
tree253da72772c158225c2e1b7d19162b34cbc8df72 /java/beans
parenteb24dd507a75da602e71c81d736346ca572d452b (diff)
downloadclasspath-d8903d4706ec6b45adfa89e1df9fc94b3055c74a.tar.gz
2005-04-28 Robert Schuster <thebohemian@gmx.net>
* java/beans/FeatureDescriptor.java: (getShortDescription): Implemented fallback mechanism and fixed documentation (fixes bug #12637). (getDisplayName): Dito.
Diffstat (limited to 'java/beans')
-rw-r--r--java/beans/FeatureDescriptor.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/java/beans/FeatureDescriptor.java b/java/beans/FeatureDescriptor.java
index 68141cf2f..0d20c5539 100644
--- a/java/beans/FeatureDescriptor.java
+++ b/java/beans/FeatureDescriptor.java
@@ -1,5 +1,5 @@
/* java.beans.FeatureDescriptor
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,6 @@ import java.util.Hashtable;
*
* @author John Keiser
* @since 1.1
- * @version 1.1.0, 31 May 1998
*/
public class FeatureDescriptor
@@ -99,10 +98,13 @@ public class FeatureDescriptor
/**
* Get the localized (display) name of this feature.
+ *
+ * @returns The localized display name of this feature or falls
+ * back to the programmatic name.
*/
public String getDisplayName()
{
- return displayName;
+ return (displayName == null) ? name : displayName;
}
/**
@@ -117,10 +119,14 @@ public class FeatureDescriptor
/**
* Get the localized short description for this feature.
+ *
+ * @returns A short localized description of this feature or
+ * what <code>getDisplayName</code> returns in case, that no short description
+ * is available.
*/
public String getShortDescription()
{
- return shortDescription;
+ return (shortDescription == null) ? getDisplayName() : shortDescription;
}
/**