[
https://issues.apache.org/jira/browse/GEODE-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16137525#comment-16137525
]
ASF GitHub Bot commented on GEODE-3472:
---------------------------------------
Github user PurelyApplied commented on a diff in the pull request:
https://github.com/apache/geode/pull/730#discussion_r134618712
--- Diff:
geode-core/src/main/java/org/apache/geode/management/internal/cli/result/AbstractResultData.java
---
@@ -147,11 +147,10 @@ public ResultData addAsFile(String fileName, String
fileContents, String message
public ResultData addAsFile(String fileName, byte[] data, int fileType,
String message,
boolean addTimeStampToName) {
- byte[] bytes = data;
--- End diff --
I might by projecting my Python and C expectations into my relatively new
Java experience, but I thought this assignment wouldn't change the mutability
of `data`. Wouldn't this need `byte[] bytes = data.clone();` to actually
provided immutability to `data`? Or is Java more defensive than I realized?
> Code Cleanup: remove dead code from /management.
> ------------------------------------------------
>
> Key: GEODE-3472
> URL: https://issues.apache.org/jira/browse/GEODE-3472
> Project: Geode
> Issue Type: Improvement
> Reporter: Patrick Rhomberg
> Assignee: Patrick Rhomberg
>
> There is a great deal of dead, commented, and unused code in the codebase.
> This ticket addresses some of it, limiting scope to those files in
> `geode-core/**/management/**` to keep the eventual diff relatively small.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)