/** We override toString() so we can display the store URLName without the password. */
  public String toString() {
    if (display == null) {
      URLName url = store.getURLName();
      if (url == null) {
        display = store.toString();
      } else {
        // don't show the password
        URLName too =
            new URLName(
                url.getProtocol(),
                url.getHost(),
                url.getPort(),
                url.getFile(),
                url.getUsername(),
                null);
        display = too.toString();
      }
    }

    return display;
  }
Example #2
0
 /**
  * Return <code>getURLName.toString()</code> if this service has a URLName, otherwise it will
  * return the default <code>toString</code>.
  */
 public String toString() {
   URLName url = getURLName();
   if (url != null) return url.toString();
   else return super.toString();
 }