Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-953

Unclosed InputStream in DatabaseUtil#initializeDatabaseStorage()

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6
    • client
    • None

    Description

      Here is related code:

          InputStream file = DatabaseUtil.class.getClassLoader().getResourceAsStream("db-storage-schema.sql");
          BufferedReader reader = new BufferedReader(new InputStreamReader(file, "UTF-8"));
      

      Neither file nor reader is closed upon exit from the method.

      Attachments

        1. LENS-953.patch
          1 kB
          Ajay Yadav
        2. LENS-953-v1.patch
          2 kB
          Ajay Yadav

        Activity

          People

            ajayyadava Ajay Yadav
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: