Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2762

Unknown resource closed

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.2
    • 1.10.0
    • java
    • None

    Description

      DataFileReader will open the resource file, but it only deals with the resource closing in abnormal situations, and it does not inform the user that he needs to actively release the resource.

      
        /** Construct a reader for a file. */
        protected DataFileReader(SeekableInput sin, DatumReader<D> reader, boolean closeOnError) throws IOException {
          super(reader);
          try {
            this.sin = new SeekableInputStream(sin);
            initialize(this.sin);
            blockFinished();
          } catch (final Throwable e) {
            if (closeOnError) {
              IOUtils.closeQuietly(sin);
            }
            throw e;
          }
        }
      
      

       I think we should add a description in the comment to help the user read it.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            zeshuai007 Zezeng Wang Assign to me
            zeshuai007 Zezeng Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment