Hi Tony,

please verify the following methods and check in.

I made upperCaseFirstLetter and lowerCaseFirstLetter more robust. If you will
give a null value or empty string as input parameter it will not crash anymore.
It will return the null value or the empty string.

    /**
     * <p>Capitalizes a string.  That is, it returns "HamburgerStall"
     * when receiving a "hamburgerStall".</p>
     *
     * @param s the input string
     * @return String the output string.
     */
    public static String upperCaseFirstLetter(String s) {
       if (s != null && s.length() > 0) {
          return s.substring(0,1).toUpperCase() + s.substring(1);
       } else {
          return s;
       }
    }

    /**
     * <p>Removes the capitalization of a string.  That is, it returns
     * "hamburgerStall" when receiving a "HamburgerStall".</p>
     *
     * @param s the input string
     * @return String the output string.
     */
    public static String lowerCaseFirstLetter(String s) {
       if (s != null && s.length() > 0) {
          return s.substring(0,1).toLowerCase() + s.substring(1);
       } else {
          return s;
       }
    }



J�rgen Dufner

--
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.




-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to