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

Unclosed InputStream in DatabaseUtil#initializeDatabaseStorage()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6
    • Component/s: client
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: