Madan Jampani

Replace Collections.unmodifiableList with guava ImmutableList

1 package org.onlab.onos.store.service; 1 package org.onlab.onos.store.service;
2 2
3 -import java.util.Collections;
4 import java.util.List; 3 import java.util.List;
5 4
5 +import com.google.common.collect.ImmutableList;
6 import com.google.common.collect.Lists; 6 import com.google.common.collect.Lists;
7 7
8 /** 8 /**
...@@ -22,7 +22,7 @@ public final class BatchReadRequest { ...@@ -22,7 +22,7 @@ public final class BatchReadRequest {
22 } 22 }
23 23
24 private BatchReadRequest(List<ReadRequest> readRequests) { 24 private BatchReadRequest(List<ReadRequest> readRequests) {
25 - this.readRequests = Collections.unmodifiableList(readRequests); 25 + this.readRequests = ImmutableList.copyOf(readRequests);
26 } 26 }
27 27
28 /** 28 /**
......
1 package org.onlab.onos.store.service; 1 package org.onlab.onos.store.service;
2 2
3 -import java.util.Collections;
4 import java.util.List; 3 import java.util.List;
5 4
5 +import com.google.common.collect.ImmutableList;
6 +
6 /** 7 /**
7 * Result of a batch read operation. 8 * Result of a batch read operation.
8 */ 9 */
...@@ -11,7 +12,7 @@ public class BatchReadResult { ...@@ -11,7 +12,7 @@ public class BatchReadResult {
11 private final List<ReadResult> readResults; 12 private final List<ReadResult> readResults;
12 13
13 public BatchReadResult(List<ReadResult> readResults) { 14 public BatchReadResult(List<ReadResult> readResults) {
14 - this.readResults = Collections.unmodifiableList(readResults); 15 + this.readResults = ImmutableList.copyOf(readResults);
15 } 16 }
16 17
17 /** 18 /**
......
1 package org.onlab.onos.store.service; 1 package org.onlab.onos.store.service;
2 2
3 -import java.util.Collections;
4 import java.util.List; 3 import java.util.List;
5 4
5 +import com.google.common.collect.ImmutableList;
6 import com.google.common.collect.Lists; 6 import com.google.common.collect.Lists;
7 7
8 /** 8 /**
...@@ -22,7 +22,7 @@ public final class BatchWriteRequest { ...@@ -22,7 +22,7 @@ public final class BatchWriteRequest {
22 } 22 }
23 23
24 private BatchWriteRequest(List<WriteRequest> writeRequests) { 24 private BatchWriteRequest(List<WriteRequest> writeRequests) {
25 - this.writeRequests = Collections.unmodifiableList(writeRequests); 25 + this.writeRequests = ImmutableList.copyOf(writeRequests);
26 } 26 }
27 27
28 /** 28 /**
......
1 package org.onlab.onos.store.service; 1 package org.onlab.onos.store.service;
2 2
3 -import java.util.Collections;
4 import java.util.List; 3 import java.util.List;
5 4
5 +import com.google.common.collect.ImmutableList;
6 +
6 /** 7 /**
7 * Result of a batch write operation. 8 * Result of a batch write operation.
8 */ 9 */
...@@ -11,7 +12,7 @@ public class BatchWriteResult { ...@@ -11,7 +12,7 @@ public class BatchWriteResult {
11 private final List<WriteResult> writeResults; 12 private final List<WriteResult> writeResults;
12 13
13 public BatchWriteResult(List<WriteResult> writeResults) { 14 public BatchWriteResult(List<WriteResult> writeResults) {
14 - this.writeResults = Collections.unmodifiableList(writeResults); 15 + this.writeResults = ImmutableList.copyOf(writeResults);
15 } 16 }
16 17
17 /** 18 /**
......