Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1837

Comment in ReaderMgr::popReader does not match code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.1
    • 3.1.0
    • Miscellaneous
    • None

    Description

      The following is in https://svn.apache.org/repos/asf/xerces/c/trunk/src/xercesc/internal/ReaderMgr.cpp

      //
      // If there was a previous entity, and either the fThrowEOE flag is set
      // or reader was marked as such, then throw an end of entity.
      //
      if (prevEntity && fThrowEOE || prevReaderThrowAtEnd)
      throw EndOfEntityException(prevEntity, readerNum);

      However, the expression in the if statement is equivalent to (prevEntity && fThrowEOE) || prevReaderThrowAtEnd, not prevEntity && (fThrowEOE || prevReaderThrowAtEnd) as the comment suggests. I believe that the latter expression is what is intended so this is probably a bug.

      Attachments

        Activity

          People

            amassari Alberto Massari
            ryanstone Ryan Stone
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: