drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java
public void setResourceUrl(URL resourceUrl) {
        Assert.isNotNull(resourceUrl);
        endRequest();
        URL oldOriginServerUrl = null;
        URL newOriginServerUrl = null;
        try {
            oldOriginServerUrl = new URL(this.resourceUrl.getProtocol(), this.resourceUrl.getHost(), this.resourceUrl.getPort(), "/"); //$NON-NLS-1$
            newOriginServerUrl = new URL(resourceUrl.getProtocol(), resourceUrl.getHost(), resourceUrl.getPort(), "/"); //$NON-NLS-1$
        } catch (MalformedURLException e) {
            // ignore?
        }
        if (!oldOriginServerUrl.equals(newOriginServerUrl)) {
            try {
                close();
            } catch (IOException e) {
                // ignore?
            }
        }
        this.resourceUrl = resourceUrl;
    }
public void setResourceUrl(URL resourceUrl) {
        Assert.isNotNull(resourceUrl);
        endRequest();
        URL oldOriginServerUrl = null;
        URL newOriginServerUrl = null;
        try {
            oldOriginServerUrl = new URL(this.resourceUrl.getProtocol(), this.resourceUrl.getHost(), this.resourceUrl.getPort(), "/"); //$NON-NLS-1$
            newOriginServerUrl = new URL(resourceUrl.getProtocol(), resourceUrl.getHost(), resourceUrl.getPort(), "/"); //$NON-NLS-1$
        } catch (MalformedURLException e) {
            // ignore?
        }
        if (!oldOriginServerUrl.equals(newOriginServerUrl)) {
            try {
                close();
            } catch (IOException e) {
                // ignore?
            }
        }
        this.resourceUrl = resourceUrl;
    }
Sets the <code>URL</code> of this connection's resource.

@param resourceUrl the <code>URL</code> of this connection's resource
@see #getResourceUrl()