#263 SuppressionCommentFilterTest fails (Java 1.4.2_04)

release_4.0
closed
Tests (17)
5
2012-10-10
2004-11-06
Ville Skyttä
No

SuppressionCommentFilterTest has one error and one
failure when run with BEA WebLogic JRockit 1.4.2_04 JVM
on Linux. It succeeds with Sun's 1.5.0 JVM.

JUnit test result HTML page from JRockit attached.

Discussion

  • Ville Skyttä
    Ville Skyttä
    2004-11-06

    SuppressionCommentFilterTest failure report

     
  • Logged In: YES
    user_id=746148

    It's very strange report indeed.
    The expected message which is listed in failure differs from
    the message I see in the test (in CVS). So perhaps this was
    a problem in your workspace.

    About error: I see very strange code in
    SuppressionCommentFilter.finishLocalSetup()
    protected void finishLocalSetup() throws CheckstyleException
    {
    if (mOnRegexp.getParenCount() !=
    mOffRegexp.getParenCount()) {
    throw new CheckstyleException(
    "onCommentFormat and offCommentFormat"
    + " have different paren counts.");
    }
    }

    I fact I'm not sure I understand what this check does :(
    As far as I know RE.getParenCount() returns something after
    successfull
    match and its result may vary from match to match. Thus I
    see no reason
    to call this method on two different RE especially when we
    donot know
    if the last matches were successfull :)

     
  • Logged In: YES
    user_id=746148

    I've removed questionable code from
    SuppressionCommentFilter.finishLocalSetup()
    Hope this helps. Feel free to reopen this bug if it is not.