Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#317 4.0beta2 has problems with jdk-1.5 and generics

release_4.0
closed
usage (27)
5
2012-10-10
2005-05-01
Rohan Lenard
No

I'm guessing this is the problem (aren't there new token
types...)

[checkstyle] May 2, 2005 8:11:20 AM
com.puppycrawl.tools.checkstyle.checks.usage
.transmogrify.Resolver resolveExpression
[checkstyle] SEVERE: Unhandled expression type: 163

Discussion

  • Logged In: YES
    user_id=746148

    it looks very similar to [ 1109222 ] Java 5.0 for:each
    breaks OneMethodPrivateFieldCheck

     
  • Scott R Duchin
    Scott R Duchin
    2005-05-10

    Logged In: YES
    user_id=781064

    Beta 2 works for me fine. I have lots of generics. I do
    believe that the default for WhitespaceAround should not
    have the tokens GENERIC_START and GENERIC_END as I had to
    use the following tokens list to get around it:

    <module name="WhitespaceAround">
      <property name="tokens"
    

    value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN"/>
    </module>

    I also added this token list for NoWhitespaceBefore:

    <module name="NoWhitespaceBefore">
      <property name="tokens"
    

    value="GENERIC_START,GENERIC_END"/>
    </module>

    and I also added GENERIC_START token into the test for
    NoWhitespaceAfter.

     
  • Rohan Lenard
    Rohan Lenard
    2005-05-10

    Logged In: YES
    user_id=651057

    Michael Studman thought this was a bug in the transmogrifier.

     
  • Hollis Waite
    Hollis Waite
    2005-06-14

    Logged In: YES
    user_id=457777

    The bug description is a little vague. I encounter this error
    when subclassing a generic class. Generic local/member
    variables and method signatures don't present a problem. A
    simple example:

    package x;
    import java.util.List;
    public abstract class BadCls<T> implements List<T> {}