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


Mime
View raw message