Camel
  1. Camel
  2. CAMEL-4265

Fail to close stream in DefaultPropertiesResolver

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.3, 2.8.0
    • Fix Version/s: 2.8.1, 2.9.0
    • Component/s: camel-core
    • Labels:
      None
    • Environment:

      Any

      Description

      protected Properties loadPropertiesFromFilePath(CamelContext context, String path) throws IOException {
      if (path.startsWith("file:"))

      { path = ObjectHelper.after(path, "file:"); }

      InputStream is = new FileInputStream(path);
      Properties answer = new Properties();
      answer.load(is);
      return answer;
      }

      Stream not closed before return, as well as in another method: loadPropertiesFromClasspath.

      1. close_inputstream.patch
        1 kB
        edge wang
      2. close_inputstream.patch
        1 kB
        edge wang

        Activity

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            edge wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development