[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-user
Subject:    Re: WebdavResouce, putMethod(), and existence
From:       Garret Wilson <garret () globalmentor ! com>
Date:       2004-12-17 23:43:59
Message-ID: 41C36F3F.6020102 () globalmentor ! com
[Download RAW message or body]

Garret Wilson wrote:
> Because I can't depend on WebdavResource.exists(), I have to call 
> WebdavResource.headMethod(). The API says that this returns a boolean to 
> indicate whether the method succeeded, but what *really* happens is that 
> it either succeeds or throws an exception if the file doesn't exist. Why 
> have a boolean return value if you're going to throw an exception for 
> failure?

Sorry, my mistake---if the file doesn't exist, 
WebdavResource.headMethod(String path) returns false instead of throwing 
an exception. Of course, this is inconsistent with the construction of 
WebdavResource, which throws an exception if the resource doesn't exist.

Garret


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic