Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-834

unused codepaths in common/json regex parser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.1.5
    • 3.1.7
    • All Tools
    • None

    Description

      Static analysis says the following parser states are unreachable:

      stateInRegexpPatternEsc in 'common/json/regexp.go'
      stateInRegexpPatternEscU in 'common/json/regexp.go'
      stateInRegexpPatternEscU1 in 'common/json/regexp.go'
      stateInRegexpPatternEscU12 in 'common/json/regexp.go'
      stateInRegexpPatternEscU123 in 'common/json/regexp.go'
      

      This is probably just dead code, since it looks like this logic may be handled by regexp() later on in the file. I wanted to run this by people with more experience with the package to make 100% sure this isn't a real bug.

      Attachments

        Issue Links

          Activity

            People

              mikeo@mongodb.com Michael O'Brien
              kyle.erf Kyle Erf
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: