You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Brian Ewins (JIRA)" <ji...@apache.org> on 2006/06/20 13:21:29 UTC

[jira] Created: (JCR-467) CompactNodeTypeReader fails to explain why valid JCR names cause errors

CompactNodeTypeReader fails to explain why valid JCR names cause errors
-----------------------------------------------------------------------

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

    Versions: 1.0.1    
    Reporter: Brian Ewins
    Priority: Minor


for example, you cannot use underscores in node type definitions:
[my:example_breaks2]

In fact only A-Z, a-z, 0-9, : are allowed, unless you quote the name. The error message you see when you make this mistake doesn't give any hint:
Missing ']' delimiter for end of node type name (nodetypes.cnd, line 8)

and the documentation on the website and the javadoc for CompactNodeTypeDefReader both just say:

 * unquoted_string ::= ...a string...

... not helpful. If you made this mistake, you end up needing to look at the source to figure out what you've done wrong. 

A few suggested solutions:
- change the documentation to say unquoted string is '[A-Za-z0-9:]+'
- change the error message to mention the token causing the problem, eg:
if (!currentTokenEquals(Lexer.END_NODE_TYPE_NAME)) {
            lexer.fail("Missing '" + Lexer.END_NODE_TYPE_NAME + "' delimiter for end of node type name, found " + currentToken);
}
- add "st.wordChars('_','_');" to the lexer, its probably going to be the most common cause, and doesnt conflict with other rules.


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


[jira] Assigned: (JCR-467) CompactNodeTypeReader fails to explain why valid JCR names cause errors

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-467?page=all ]

Jukka Zitting reassigned JCR-467:
---------------------------------

    Assign To: Jukka Zitting

> CompactNodeTypeReader fails to explain why valid JCR names cause errors
> -----------------------------------------------------------------------
>
>          Key: JCR-467
>          URL: http://issues.apache.org/jira/browse/JCR-467
>      Project: Jackrabbit
>         Type: Improvement

>     Versions: 1.0, 1.0.1
>     Reporter: Brian Ewins
>     Assignee: Jukka Zitting
>     Priority: Minor
>      Fix For: 1.1

>
> for example, you cannot use underscores in node type definitions:
> [my:example_breaks2]
> In fact only A-Z, a-z, 0-9, : are allowed, unless you quote the name. The error message you see when you make this mistake doesn't give any hint:
> Missing ']' delimiter for end of node type name (nodetypes.cnd, line 8)
> and the documentation on the website and the javadoc for CompactNodeTypeDefReader both just say:
>  * unquoted_string ::= ...a string...
> ... not helpful. If you made this mistake, you end up needing to look at the source to figure out what you've done wrong. 
> A few suggested solutions:
> - change the documentation to say unquoted string is '[A-Za-z0-9:]+'
> - change the error message to mention the token causing the problem, eg:
> if (!currentTokenEquals(Lexer.END_NODE_TYPE_NAME)) {
>             lexer.fail("Missing '" + Lexer.END_NODE_TYPE_NAME + "' delimiter for end of node type name, found " + currentToken);
> }
> - add "st.wordChars('_','_');" to the lexer, its probably going to be the most common cause, and doesnt conflict with other rules.

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


[jira] Updated: (JCR-467) CompactNodeTypeReader fails to explain why valid JCR names cause errors

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-467?page=all ]

Jukka Zitting updated JCR-467:
------------------------------

    Component: nodetype

> CompactNodeTypeReader fails to explain why valid JCR names cause errors
> -----------------------------------------------------------------------
>
>          Key: JCR-467
>          URL: http://issues.apache.org/jira/browse/JCR-467
>      Project: Jackrabbit
>         Type: Improvement

>   Components: nodetype
>     Versions: 1.0, 1.0.1
>     Reporter: Brian Ewins
>     Assignee: Jukka Zitting
>     Priority: Minor
>      Fix For: 1.1

>
> for example, you cannot use underscores in node type definitions:
> [my:example_breaks2]
> In fact only A-Z, a-z, 0-9, : are allowed, unless you quote the name. The error message you see when you make this mistake doesn't give any hint:
> Missing ']' delimiter for end of node type name (nodetypes.cnd, line 8)
> and the documentation on the website and the javadoc for CompactNodeTypeDefReader both just say:
>  * unquoted_string ::= ...a string...
> ... not helpful. If you made this mistake, you end up needing to look at the source to figure out what you've done wrong. 
> A few suggested solutions:
> - change the documentation to say unquoted string is '[A-Za-z0-9:]+'
> - change the error message to mention the token causing the problem, eg:
> if (!currentTokenEquals(Lexer.END_NODE_TYPE_NAME)) {
>             lexer.fail("Missing '" + Lexer.END_NODE_TYPE_NAME + "' delimiter for end of node type name, found " + currentToken);
> }
> - add "st.wordChars('_','_');" to the lexer, its probably going to be the most common cause, and doesnt conflict with other rules.

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


[jira] Resolved: (JCR-467) CompactNodeTypeReader fails to explain why valid JCR names cause errors

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-467?page=all ]
     
Jukka Zitting resolved JCR-467:
-------------------------------

    Resolution: Fixed

Fixed as suggested in revision 418446. Thanks a lot for the excellent bug report with an accurate fix!

> CompactNodeTypeReader fails to explain why valid JCR names cause errors
> -----------------------------------------------------------------------
>
>          Key: JCR-467
>          URL: http://issues.apache.org/jira/browse/JCR-467
>      Project: Jackrabbit
>         Type: Improvement

>     Versions: 1.0, 1.0.1
>     Reporter: Brian Ewins
>     Assignee: Jukka Zitting
>     Priority: Minor
>      Fix For: 1.1

>
> for example, you cannot use underscores in node type definitions:
> [my:example_breaks2]
> In fact only A-Z, a-z, 0-9, : are allowed, unless you quote the name. The error message you see when you make this mistake doesn't give any hint:
> Missing ']' delimiter for end of node type name (nodetypes.cnd, line 8)
> and the documentation on the website and the javadoc for CompactNodeTypeDefReader both just say:
>  * unquoted_string ::= ...a string...
> ... not helpful. If you made this mistake, you end up needing to look at the source to figure out what you've done wrong. 
> A few suggested solutions:
> - change the documentation to say unquoted string is '[A-Za-z0-9:]+'
> - change the error message to mention the token causing the problem, eg:
> if (!currentTokenEquals(Lexer.END_NODE_TYPE_NAME)) {
>             lexer.fail("Missing '" + Lexer.END_NODE_TYPE_NAME + "' delimiter for end of node type name, found " + currentToken);
> }
> - add "st.wordChars('_','_');" to the lexer, its probably going to be the most common cause, and doesnt conflict with other rules.

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


[jira] Updated: (JCR-467) CompactNodeTypeReader fails to explain why valid JCR names cause errors

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-467?page=all ]

Jukka Zitting updated JCR-467:
------------------------------

    Fix Version: 1.1
        Version: 1.0

> CompactNodeTypeReader fails to explain why valid JCR names cause errors
> -----------------------------------------------------------------------
>
>          Key: JCR-467
>          URL: http://issues.apache.org/jira/browse/JCR-467
>      Project: Jackrabbit
>         Type: Improvement

>     Versions: 1.0.1, 1.0
>     Reporter: Brian Ewins
>     Priority: Minor
>      Fix For: 1.1

>
> for example, you cannot use underscores in node type definitions:
> [my:example_breaks2]
> In fact only A-Z, a-z, 0-9, : are allowed, unless you quote the name. The error message you see when you make this mistake doesn't give any hint:
> Missing ']' delimiter for end of node type name (nodetypes.cnd, line 8)
> and the documentation on the website and the javadoc for CompactNodeTypeDefReader both just say:
>  * unquoted_string ::= ...a string...
> ... not helpful. If you made this mistake, you end up needing to look at the source to figure out what you've done wrong. 
> A few suggested solutions:
> - change the documentation to say unquoted string is '[A-Za-z0-9:]+'
> - change the error message to mention the token causing the problem, eg:
> if (!currentTokenEquals(Lexer.END_NODE_TYPE_NAME)) {
>             lexer.fail("Missing '" + Lexer.END_NODE_TYPE_NAME + "' delimiter for end of node type name, found " + currentToken);
> }
> - add "st.wordChars('_','_');" to the lexer, its probably going to be the most common cause, and doesnt conflict with other rules.

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