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

        edge wang created issue -
        Claus Ibsen made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Component/s camel-core [ 12313938 ]
        edge wang made changes -
        Attachment close_inputstream.patch [ 12487791 ]
        edge wang made changes -
        Attachment close_inputstream.patch [ 12487796 ]
        Claus Ibsen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Claus Ibsen [ davsclaus ]
        Resolution Fixed [ 1 ]
        edge wang made changes -
        Fix Version/s 2.8.1 [ 12317152 ]
        Claus Ibsen made changes -
        Fix Version/s 2.8.1 [ 12317152 ]
        Claus Ibsen made changes -
        Fix Version/s 2.8.1 [ 12317152 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development