Skip to content

Commit e1d59dc

Browse files
committed
Wrap ConfigOrigin.comments in unmodifiableList
This prevents people from messing with the returned list.
1 parent 0f4508c commit e1d59dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/src/main/java/com/typesafe/config/impl/SimpleConfigOrigin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public int lineNumber() {
221221
@Override
222222
public List<String> comments() {
223223
if (commentsOrNull != null) {
224-
return commentsOrNull;
224+
return Collections.unmodifiableList(commentsOrNull);
225225
} else {
226226
return Collections.emptyList();
227227
}

0 commit comments

Comments
 (0)