Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11969

PROPFILE token does not properly close the property file

      The current implementation of the PROPFILE token does not explicitly close the property file after reading it. This can lead to the property file being held open by the JVM for extended periods, long beyond the duration of the build job. On my Windows 7 build slave, the file appears to be held open indefinitely, and while testing the bug I once even saw two separate file handles open against a single property file. The open file handles prevent the file from being manipulated (deleted, moved, etc.) in Windows.

      PropertyFromFileMacro.ReadProperty.call() should explicitly close the input file immediately after calling Properties.load().

          [JENKINS-11969] PROPFILE token does not properly close the property file

          Joshua Niehus added a comment - - edited

          This issue should be resolved by my pull request and its subsequent commits on GitHub:
          https://github.com/jenkinsci/token-macro-plugin/pull/4

          Fixing commit:
          https://github.com/jniehus/token-macro-plugin/commit/a1c32a353ea964ca9de2891524a6005a2a4da3e3

          Joshua Niehus added a comment - - edited This issue should be resolved by my pull request and its subsequent commits on GitHub: https://github.com/jenkinsci/token-macro-plugin/pull/4 Fixing commit: https://github.com/jniehus/token-macro-plugin/commit/a1c32a353ea964ca9de2891524a6005a2a4da3e3

          Alex Earl added a comment -

          This was fixed some time ago.

          Alex Earl added a comment - This was fixed some time ago.

            slide_o_mix Alex Earl
            rvaughn rvaughn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: