jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dan z" <danz8...@hotmail.com>
Subject question on CompactNodeTypeDefReader: parsing "long" value constraints
Date Wed, 05 Jul 2006 20:10:48 GMT

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;

Watch music videos on Sympatico / MSN Video! 

View raw message