jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Toper" <nto...@gmail.com>
Subject Re: IllegalArgumentException with invalid UUID
Date Sun, 02 Jul 2006 20:49:47 GMT
I agree wsith Jukka. It makes sense.

On 7/2/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
>
> Hi,
>
> On 7/2/06, Tobias Bocanegra <tobias.bocanegra@day.com> wrote:
> > why? it's an illegal argument, since the uuid format is not valid.
> > i disagree to throw another exception. i suggest to add the
> > IllegalArgumentException to the spec/javadoc.
>
> The spec never references the UUID specification or defines the UUID
> format being used. There's even an example with "1111 2222 3333 4444"
> as an UUID, so to me the UUID format in JCR is not really clear enough
> to warrant an IllegalArgumentException.
>
> And even if it were clearly defined, I'd still vote for an
> ItemNotFoundException because the application calling
> Session.getNodeByUUID() is primarily looking for the node and doesn't
> care whether the UUID format is correct. Throwing an unchecked
> exception will definitely surprise a number of applications. Even a
> RepositoryException would be better than IllegalArgumentException.
>
> The same logic could also be applied to Session.getItem(). Currently
> we throw a RepositoryException when encountering an invalid path.
>
> BR,
>
> Jukka Zitting
>
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftsmanship, JCR consulting, and Java development
>



-- 
a+
Nico
my blog! http://www.deviant-abstraction.net !!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message