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

unused codepaths in common/json regex parser

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.1.5
    • Fix Version/s: 3.1.7
    • Component/s: All Tools
    • Labels:
      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

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

                Dates

                Created:
                Updated:
                Resolved: