You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2022/02/06 21:38:00 UTC
[jira] [Updated] (IO-758) Deprecate PathUtils.NOFOLLOW_LINK_OPTION_ARRAY in favor of noFollowLinkOptionArray().
[ https://issues.apache.org/jira/browse/IO-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated IO-758:
-------------------------------
Summary: Deprecate PathUtils.NOFOLLOW_LINK_OPTION_ARRAY in favor of noFollowLinkOptionArray(). (was: Add factory method as replacement for PathUtils.NOFOLLOW_LINK_OPTION_ARRAY)
> Deprecate PathUtils.NOFOLLOW_LINK_OPTION_ARRAY in favor of noFollowLinkOptionArray().
> -------------------------------------------------------------------------------------
>
> Key: IO-758
> URL: https://issues.apache.org/jira/browse/IO-758
> Project: Commons IO
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 2.11.0
> Reporter: Marcono1234
> Priority: Minor
>
> 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|https://rules.sonarsource.com/java/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?).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)