[ checkstyle-Patches-1956561 ] New Java 5 Checks - ClassTypeParameterName, MethodTypePar...

View: New views
1 Messages — Rating Filter:   Alert me  

[ checkstyle-Patches-1956561 ] New Java 5 Checks - ClassTypeParameterName, MethodTypePar...

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Patches item #1956561, was opened at 2008-05-03 15:04
Message generated for change (Comment added) made by oburn
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397080&aid=1956561&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Travis Schneeberger (tschneeberger)
>Assigned to: Oliver Burn (oburn)
Summary: New Java 5 Checks - ClassTypeParameterName, MethodTypePar...

Initial Comment:
CheckStyle team,

I have created two new checks to support Java 5's Generic type parameters.  These checks are "naming" checks much like the other naming checks available.

Sun recommends naming type parameters a single capital letter.  Usually, the letters are T, E, V, or K.  Since it may be necessary to use other letters in some complex configurations the default format is a single capital letter.

I created two checks one for class type parameters and one for method type parameters.  This way a different naming convention can be used for each.

I have included the checks, tests, test input, and xdocs.

This is a little different than my usual submissions.  The checks conform to the checkstyle checks.  It also have %100 code coverage.  They pass almost all of the junit tests that I wrote except one.  

I'm not sure how to resolve this failure because it is causing a DetailAST test to fail.  It seems like the GeneratedJavaRecognizer is unable to parse my test input (see below) even though it is valid Java source.  I would fix the problem but I'm not real familiar with tools used to generate the Java grammar classes.  I thought you may have an easier time figuring this one out. I still wanted to do the submission because I believe everything else is correct and this patch would be useful.  

Let me know if there is anything else I should do or if you have any questions.

Example causing the failure (see InputTypeParameterName.java):

        Other o = new Other() {
            <EE> void getMoreFoo() {
            }
        };


~Travis



----------------------------------------------------------------------

>Comment By: Oliver Burn (oburn)
Date: 2008-07-02 16:13

Message:
Logged In: YES
user_id=218824
Originator: NO

Created bug #2008498 for the defect and assigning back to me to submit the
patch.

----------------------------------------------------------------------

Comment By: Oliver Burn (oburn)
Date: 2008-05-13 09:15

Message:
Logged In: YES
user_id=218824
Originator: NO

Assigning to our ANTLR guru to look into the problem in the Java grammar.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397080&aid=1956561&group_id=29721

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Checkstyle-devel mailing list
Checkstyle-devel@...
https://lists.sourceforge.net/lists/listinfo/checkstyle-devel
LightInTheBox - Buy quality products at wholesale price