jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: DateValue.getDate not a copy
Date Tue, 19 Feb 2008 11:53:49 GMT
Hi Sebastian,

I'd say this is a bug. can you please file a bug report?

http://issues.apache.org/jira/browse/JCR

thank you

regards
  marcel

Sebastian Prehn wrote:
> Hi
> I noticed that getDate() in org.apache.jackrabbit.value.DateValue is returned 
> by reference. According to the specification it should be a copy. (see. 
> 6.2.7) Do I miss something or is this a bug?
> 
> 
> private Calendar date;
> 
> public Calendar getDate()
>             throws ValueFormatException, IllegalStateException,
>             RepositoryException {
>         setValueConsumed();
> 
>         if (date != null) {
>             return date; // <-- HERE
>         } else {
>             throw new ValueFormatException("empty value");
>         }
>     }
> 
> 


Mime
View raw message