SonarQube
  1. SonarQube
  2. SONAR-3032

When the "Redundant Throws" Checkstyle check can't manage to get a class information, a runtime exception is thrown and the analysis of this file is stopped

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      3

      Issue Links

        Activity

        Hide
        Evgeny Mandrikov added a comment - - edited

        Seems that behaviour of this check has been changed after migration to Checkstyle 5.5 (SONAR-1836), i.e. I can't reproduce this issue in Sonar 2.13.

        Show
        Evgeny Mandrikov added a comment - - edited Seems that behaviour of this check has been changed after migration to Checkstyle 5.5 ( SONAR-1836 ), i.e. I can't reproduce this issue in Sonar 2.13.
        Hide
        David RACODON added a comment -

        You seem to confirm what we thought. See http://markmail.org/message/rvgjbykdalhyu4p4

        Show
        David RACODON added a comment - You seem to confirm what we thought. See http://markmail.org/message/rvgjbykdalhyu4p4
        Hide
        Evgeny Mandrikov added a comment -

        I just confirm that behaviour was changed, however would be better to understand how I'll come back to this thread tomorrow.

        Show
        Evgeny Mandrikov added a comment - I just confirm that behaviour was changed, however would be better to understand how I'll come back to this thread tomorrow.
        Hide
        Evgeny Mandrikov added a comment -

        Here is an explanation of changes from release notes for Checkstyle 5.3 :

        Changed the default value of the property logLoadErrors to be true for the checks RedundantThrows and JavadocMethod to ensure consistent behaviour.

        Which means that violation will be shown, when Checkstyle is unable to load class, and processing of file will continue.
        Also should be noted that Sonar doesn't allow to change value of this property, because it isn't presented in rules.

        Show
        Evgeny Mandrikov added a comment - Here is an explanation of changes from release notes for Checkstyle 5.3 : Changed the default value of the property logLoadErrors to be true for the checks RedundantThrows and JavadocMethod to ensure consistent behaviour. Which means that violation will be shown, when Checkstyle is unable to load class, and processing of file will continue. Also should be noted that Sonar doesn't allow to change value of this property, because it isn't presented in rules.
        Hide
        Evgeny Mandrikov added a comment - - edited

        I've added parameter "suppressLoadErrors" with default value "true" to Checkstyle rules "RedundantThrows" and "JavadocMethod" in order to not produce false-positive violations - 7d5b618. Also should be noted that default value for this parameter in Checkstyle 5.5 set to false.

        Show
        Evgeny Mandrikov added a comment - - edited I've added parameter "suppressLoadErrors" with default value "true" to Checkstyle rules "RedundantThrows" and "JavadocMethod" in order to not produce false-positive violations - 7d5b618 . Also should be noted that default value for this parameter in Checkstyle 5.5 set to false.
        Hide
        Freddy Mallet added a comment -

        Manually tested

        Show
        Freddy Mallet added a comment - Manually tested
        Hide
        Evgeny Mandrikov added a comment -

        Integration test added.

        Show
        Evgeny Mandrikov added a comment - Integration test added.

          People

          • Assignee:
            Evgeny Mandrikov
            Reporter:
            Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: