mirror of
https://github.com/lightbend/config.git
synced 2025-02-21 08:40:51 +08:00
Wrap ConfigOrigin.comments in unmodifiableList
This prevents people from messing with the returned list.
This commit is contained in:
parent
0f4508cc67
commit
e1d59dc48c
@ -221,7 +221,7 @@ final class SimpleConfigOrigin implements ConfigOrigin {
|
||||
@Override
|
||||
public List<String> comments() {
|
||||
if (commentsOrNull != null) {
|
||||
return commentsOrNull;
|
||||
return Collections.unmodifiableList(commentsOrNull);
|
||||
} else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user