Hi Tony,

On Fri, 2005-12-09 at 14:31 -0500, Anthony Balkissoon wrote:
> +   * @param t the text to display in this JEditorPane
> +   */
>    public void setText(String t)
>    {
> -    super.setText(t);
> +    try
> +    {
> +      // Remove the current content.
> +      Document doc = getDocument();
> +      doc.remove(0, doc.getLength());
> +      if (t == null || t == "")
> +        return;

Please document the behavior when t == null.
Also you should compare Strings (even the empty String) with equals().

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to