Make an unmodifiable copy of the list with current file paths
The list with the current file paths that is stored in ChangeData should not be modified. To protect against modifications it is made unmodifiable and when setting the list a defensive copy of the passed list is done so that changes to the passed list after the fact do not impact the list stored in ChangeData. Change-Id: I396d63fc13caf6925aaab4fa5dd76fc7ba9816e6 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -189,7 +189,7 @@ public class ChangeData {
|
||||
}
|
||||
|
||||
public void setCurrentFilePaths(List<String> filePaths) {
|
||||
currentFiles = filePaths;
|
||||
currentFiles = ImmutableList.copyOf(filePaths);
|
||||
}
|
||||
|
||||
public List<String> currentFilePaths(Provider<ReviewDb> db,
|
||||
|
||||
Reference in New Issue
Block a user