classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: FeatureDescriptor fixes for #12637


From: Robert Schuster
Subject: [cp-patches] FYI: FeatureDescriptor fixes for #12637
Date: Thu, 28 Apr 2005 22:09:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.7) Gecko/20050427

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
with this patch bug #12637 is fixed.

ChangeLog:

2005-04-28  Robert Schuster  <address@hidden>

    * java/beans/FeatureDescriptor.java:
    (getShortDescription): Implemented fallback mechanism and fixed
    documentation (fixes bug #12637).
    (getDisplayName): Dito.


cu
Robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCcULeG9cfwmwwEtoRAuLPAKCID9bzkEaisTn67vBYRMPtiFqBUgCgn6xT
TtNCh89S73VuhShzrmqbVG8=
=VSEz
-----END PGP SIGNATURE-----
Index: java/beans/FeatureDescriptor.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/FeatureDescriptor.java,v
retrieving revision 1.7
diff -u -r1.7 FeatureDescriptor.java
--- java/beans/FeatureDescriptor.java   26 Dec 2003 19:39:54 -0000      1.7
+++ java/beans/FeatureDescriptor.java   28 Apr 2005 20:05:55 -0000
@@ -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 @@
  *
  * @author John Keiser
  * @since 1.1
- * @version 1.1.0, 31 May 1998
  */
 
 public class FeatureDescriptor
@@ -99,10 +98,13 @@
 
   /**
    * 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 @@
 
   /**
    * 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;
   }
 
   /**

reply via email to

[Prev in Thread] Current Thread [Next in Thread]