code: public boolean sameFile(URL other) {
          try {
            return getDelegate().sameFile(this, other);
          } catch (MalformedURLException e) {
            return file.equals(other.file);
          }
      }
docs: Compares two URLs, excluding the fragment component.<p>
  
  Returns <code>true</code> if this <code>URL</code> and the
  <code>other</code> argument are equal without taking the
  fragment component into consideration.
  
  @param   other   the <code>URL</code> to compare against.
  @return  <code>true</code> if they reference the same remote object;
  <code>false</code> otherwise.