Uploaded image for project: '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
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    1. sonar-2.12.png
      20 kB
    2. sonar-2.13.png
      32 kB

      Issue Links

        Activity

        Hide
        godin OLD - 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
        godin OLD - 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
        racodond David Racodon added a comment -

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

        Show
        racodond David Racodon added a comment - You seem to confirm what we thought. See http://markmail.org/message/rvgjbykdalhyu4p4
        Hide
        godin OLD - 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
        godin OLD - 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
        godin OLD - 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
        godin OLD - 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
        godin OLD - 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
        godin OLD - 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 Freddy Mallet added a comment -

        Manually tested

        Show
        freddy.mallet Freddy Mallet added a comment - Manually tested
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Integration test added.

        Show
        godin OLD - Evgeny Mandrikov added a comment - Integration test added.

          People

          • Assignee:
            godin OLD - Evgeny Mandrikov
            Reporter:
            freddy.mallet Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: