Uploaded image for project: 'Crunch (Retired)'
  1. Crunch (Retired)
  2. CRUNCH-567

close() triggers NPE if initialize() fails in 2 classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.12.0
    • 0.14.0
    • Core
    • None

    Description

      Quite trivial, but just noticed this on a customer project: in AvroRecordReader and HFileInputFormat, close() closes a reader object. However it will be null if initialize() is never called or fails to complete normally, generating an NPE. It ends up being an issue since their close() is called in some kind of finally block at some point.

      Attaching a patch for now but do we do pull requests here now instead?

      Attachments

        1. CRUNCH-567.patch
          1 kB
          Sean R. Owen

        Activity

          People

            gabriel.reid Gabriel Reid
            srowen Sean R. Owen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: