Uploaded image for project: 'SonarVB6'
  1. SonarVB6
  2. SONARVBSIX-289

Analyzer shoudn't crash on empty "REM" statement

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7
    • Component/s: None
    • Labels:
      None

      Description

      REM statements are basically a way to specify comments.
      The documentation clearly states that the comment is optional:

      Syntax
      Rem comment

      You can also use the following syntax:
      'comment

      The optional comment argument is the text of any comment you want to include.

      The analyzer should therefore not crash with the following stack trace when REM is not followed by any other character on a line:

      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at java.lang.String.substring(String.java:1931)
      	at com.sonar.vb.D.C.B(na:2586)
      	at com.sonar.vb.D.C.A(na:3056)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pavel.mikula Pavel Mikula
              Reporter:
              pierre-yves.nicolas Pierre-Yves Nicolas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: