Skip to content

Commit a3c567e

Browse files
baywetzengin
andauthored
Update src/main/java/com/microsoft/graph/http/BaseCollectionPage.java
Co-authored-by: Mustafa Zengin <muzengin@microsoft.com>
1 parent 8896c8b commit a3c567e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/main/java/com/microsoft/graph/http/BaseCollectionPage.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,9 @@ public abstract class BaseCollectionPage<T1, T2 extends IRequestBuilder> impleme
6767
* @param nextRequestBuilder the request builder for the next page
6868
*/
6969
public BaseCollectionPage(final List<T1> pageContents, final T2 nextRequestBuilder) {
70-
if(pageContents == null) {
71-
this.pageContents = new ArrayList<T1>();
72-
} else {
73-
// CollectionPages are never directly modifiable, either 'update'/'delete' the specific child or 'add' the new
74-
// object to the 'children' of the collection.
75-
this.pageContents = Collections.unmodifiableList(pageContents);
76-
}
70+
// CollectionPages are never directly modifiable, either 'update'/'delete' the specific child or 'add' the new
71+
// object to the 'children' of the collection.
72+
this.pageContents = Collections.unmodifiableList(pageContents == null ? new ArrayList<T1>() : pageContents);
7773
requestBuilder = nextRequestBuilder;
7874
}
7975

0 commit comments

Comments
 (0)