File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
spring-core/src/main/java/org/springframework/util/xml Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
16
16
17
17
package org .springframework .util .xml ;
18
18
19
- import java .util .Collections ;
19
+ import java .util .ArrayList ;
20
20
import java .util .List ;
21
21
import java .util .NoSuchElementException ;
22
22
import javax .xml .stream .events .XMLEvent ;
25
25
import org .springframework .util .Assert ;
26
26
27
27
/**
28
- * Implementation of {@code XMLEventReader} based on a list of {@link XMLEvent}s.
28
+ * Implementation of {@code XMLEventReader} based on a {@link List}
29
+ * of {@link XMLEvent} elements.
29
30
*
30
31
* @author Arjen Poutsma
31
32
* @since 5.0
@@ -38,8 +39,8 @@ class ListBasedXMLEventReader extends AbstractXMLEventReader {
38
39
39
40
40
41
public ListBasedXMLEventReader (List <XMLEvent > events ) {
41
- Assert .notNull (events , "'events' must not be null" );
42
- this .events = Collections . unmodifiableList (events );
42
+ Assert .notNull (events , "XMLEvent List must not be null" );
43
+ this .events = new ArrayList <> (events );
43
44
}
44
45
45
46
You can’t perform that action at this time.
0 commit comments