DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=29429>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29429 allow '_' (underscore) in validwhen identifier Summary: allow '_' (underscore) in validwhen identifier Product: Struts Version: Nightly Build Platform: All OS/Version: All Status: NEW Severity: Major Priority: Other Component: Validator Framework AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In our project, we validate dynabean property names that contain underscore ('_') characters. The problem is that these properties cannot be validated using validwhen in the 20040605 build. The following exception is thrown: line 1:3: unexpected char: '_' at org.apache.struts.validator.validwhen.ValidWhenLexer.nextToken(ValidWhenLexer.java:229) I have tested and propose the following fix: change the the ValidWhenLexer.java to recognize the '_' character as a valid identifier character. To accomplish this, change the IDENTIFIER definition in ValidWhenParser.g to read: IDENTIFIER : ( 'a'..'z' | '.' | '_') ( 'a'..'z' | '0'..'9' | '.' | '_')+ ; For a more general solution, one could look into the Java identifier definition: http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625 rv --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]