jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: question on CompactNodeTypeDefReader: parsing "long" value constraints
Date Wed, 05 Jul 2006 20:17:00 GMT
hi dan,
this is probably a bug. i opened a jira issue for you:
  http://issues.apache.org/jira/browse/JCR-475

regards, toby


On 7/5/06, dan z <danz8086@hotmail.com> wrote:
> Hi,
>
> I got a ParseException when loading a CND file with
> CompactNodeTypeDefReader. The part of my CND file is listed below:
>
> [cm:aclEntryNode] > nt:base
> -cm:uid (string) mandatory copy
> -cm:permission (long) mandatory multiple copy
> <1,2,4,8,16
>
> The parsing code complained about the line of value constraints for property
> "cm:permission" with message "'?' is not a valid constraint expression for a
> value of type 3".
>
> I've been debugging through the source and it seems that the getNextToken()
> method is not handling TT_Number as expected.
>
> Did I miss anything? or is this a bug?
>
> Thanks,
> Dan
>
> Lexer.getNextToken() as below:
>
> public String getNextToken() throws ParseException {
>         try {
>             int tokenType = st.nextToken();
>             if (tokenType == StreamTokenizer.TT_EOF){
>                 return EOF;
>             } else if(tokenType == StreamTokenizer.TT_WORD || tokenType ==
> SINGLE_QUOTE || tokenType == DOUBLE_QUOTE){
>                 return st.sval;
>             } else {
>                 return new String(new char[]{(char)tokenType});
>             }
>         } catch (IOException e){
>             fail("IOException while attempting to read input stream", e);
>             return null;
>         }
>     }
>
> _________________________________________________________________
> Watch music videos on Sympatico / MSN Video!
> http://video.msn.com/v/en-ca/v.htm?t=c317&f=38/81&p=ENCAmusic_ENCAvideos
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message