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

unused codepaths in common/json regex parser

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.7
    • Affects Version/s: 3.1.5
    • Component/s: All Tools
    • None

      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.

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

              Created:
              Updated:
              Resolved: