tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22867] - Tag handlers can't be inner/nested classes
Date Tue, 02 Sep 2003 22:00:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22867

Tag handlers can't be inner/nested classes





------- Additional Comments From gthb@dimon.is  2003-09-02 22:00 -------
You certainly can, but if you did that, you would pretty much have only yourself
to blame when tools give you a hard time about it, because of this clause in the
Java Language Specification (Section 3.8, Java Identifiers):

    The Java letters include uppercase and lowercase ASCII Latin letters A-Z
    (\u0041-\u005a), and a-z (\u0061-\u007a), and, for historical reasons,
    the ASCII underscore (_, or \u005f) and dollar sign ($, or \u0024). The $
    character should be used only in mechanically generated source code or,
    rarely, to access preexisting names on legacy systems.
    
http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625

Given that, I think it would be fair to assume that '$' means a nested class
... especially since doing that repairs a common use case that is currently
broken, perhaps at the cost of breaking an arcane one which is probably *also*
currently broken :)

But this section of the JLS does beg the question: why is the JSP compiler
rejecting an identifier with a '$' in it? Since it is legal (apparently in
source code as well -- I thought it wasn't), there shouldn't be a problem
resolving a classname like A$B when there is an import declaration for A
and A contains a static nested class called B -- should there? Is Sun's
javac breaking the JLS by rejecting this?

Mime
View raw message