jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-475) CompactNodeTypeDefReader fails parsing 'long' value constraints
Date Wed, 05 Jul 2006 20:16:29 GMT
CompactNodeTypeDefReader fails parsing 'long' value constraints
---------------------------------------------------------------

         Key: JCR-475
         URL: http://issues.apache.org/jira/browse/JCR-475
     Project: Jackrabbit
        Type: Bug

    Reporter: Tobias Bocanegra
     Fix For: 1.1, 0.9, 1.0


[copied from email to user list]

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;
       }
   }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message