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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.14.0
    • Component/s: Core
    • Labels:
      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 Owen

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: