Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-758

Deprecate PathUtils.NOFOLLOW_LINK_OPTION_ARRAY in favor of noFollowLinkOptionArray().

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.11.0
    • 2.12.0
    • Utilities
    • None

    Description

      The public static field org.apache.commons.io.file.PathUtils.NOFOLLOW_LINK_OPTION_ARRAY has as value a non-empty array.

      This is error-prone because by accident (or intentionally by malicious code) the element of the array could be replaced, which could cause completely unrelated parts of an application to malfunction.
      See also SonarSource rule RSPEC-2386.

      It would be good to instead add a static factory method which creates a new array every time and to mark the NOFOLLOW_LINK_OPTION_ARRAY field as deprecated (for removal?).

      Attachments

        Activity

          People

            Unassigned Unassigned
            Marcono1234 Marcono1234
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: