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]


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

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?


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 ==
               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:
For more information on JIRA, see:

View raw message