[
https://issues.apache.org/jira/browse/HADOOP-20088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18144765#comment-18144765
]
ASF GitHub Bot commented on HADOOP-20088:
-----------------------------------------
joseluisll commented on PR #8995:
URL: https://github.com/apache/hadoop/pull/8995#issuecomment-6875222349
@ayushtkn Please review this PR as well for spotbugs fixes. These have been
divided from the the exclusions only PR #8818 . Thanks in advance.
> Defensive copies and immutability fixes for hadoop-distcp SpotBugs warnings
> ---------------------------------------------------------------------------
>
> Key: HADOOP-20088
> URL: https://issues.apache.org/jira/browse/HADOOP-20088
> Project: Hadoop Common
> Issue Type: Bug
> Components: tools/distcp
> Reporter: Jose Luis López
> Priority: Minor
> Labels: pull-request-available
>
> The nightly trunk build (qbt) reports 19 SpotBugs warning(s) in
> hadoop-tools/hadoop-distcp. This issue tracks fixing 10 of them by code
> changes (defensive copies, unmodifiable views and related small behaviour
> changes), with unit tests:
> # SimpleCopyListing, SS_SHOULD_BE_STATIC on maxRetries: private static final
> int MAX_RETRIES
> # DiffInfo, CT_CONSTRUCTOR_THROW: package-private class made final
> # DynamicInputChunk, CT_CONSTRUCTOR_THROW: package-private class made final
> # DynamicInputChunkContext, CT_CONSTRUCTOR_THROW: package-private class made
> final
> # CopyListingFileStatus, EI_EXPOSE_REP2 on setAclEntries: copies the list,
> keeping null as null
> # CopyListingFileStatus, EI_EXPOSE_REP2 on setXAttrs: copies into a
> LinkedHashMap, keeping null as null and the iteration order
> # DistCpContext, EI_EXPOSE_REP2 on setSourcePaths: copies the list, keeping
> null as null
> # DistCpContext, EI_EXPOSE_REP on getSourcePaths: returns an unmodifiable
> view, or null
> # DistCpOptions$Builder, EI_EXPOSE_REP2 on <init>: copies the source path
> list (DistCpOptions is documented as immutable)
> # DistCpOptionSwitch, EI_EXPOSE_REP on getOption: returns a clone of the
> enum's shared CLI Option
> No public method signature changes.
> The remaining 9 warnings, where the current behaviour is intended, are
> handled by narrow module-level SpotBugs exclusions tracked in HADOOP-20017.
> Contains content generated by Claude Code.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]