Skip to content

Commit

Permalink
Replace List.of -> Arrays.asList
Browse files Browse the repository at this point in the history
  • Loading branch information
joonhaengHeo committed Nov 6, 2023
1 parent 74641f0 commit cc44387
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public class ChipClusters {
boolean isFabricFiltered) {
ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId);
ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, List.of(path), null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null);
ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null);
}

protected void writeAttribute(
Expand All @@ -208,7 +208,7 @@ public class ChipClusters {
WriteAttributesCallbackJni jniCallback = new WriteAttributesCallbackJni(callback);
byte[] tlv = encodeToTlv(value);
AttributeWriteRequest writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlv);
ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, List.of(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue());
ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue());
}

protected void subscribeAttribute(
Expand All @@ -218,7 +218,7 @@ public class ChipClusters {
int maxInterval) {
ReportCallbackJni jniCallback = new ReportCallbackJni(callback, callback, null);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId);
ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, List.of(path), null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null);
ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null);
}

protected void invoke(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected void readAttribute(
boolean isFabricFiltered) {
ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId);
ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, List.of(path), null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null);
ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null);
}

protected void writeAttribute(
Expand All @@ -131,7 +131,7 @@ protected void writeAttribute(
WriteAttributesCallbackJni jniCallback = new WriteAttributesCallbackJni(callback);
byte[] tlv = encodeToTlv(value);
AttributeWriteRequest writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlv);
ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, List.of(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue());
ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue());
}

protected void subscribeAttribute(
Expand All @@ -141,7 +141,7 @@ protected void subscribeAttribute(
int maxInterval) {
ReportCallbackJni jniCallback = new ReportCallbackJni(callback, callback, null);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId);
ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, List.of(path), null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null);
ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null);
}

protected void invoke(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected void readAttribute(
boolean isFabricFiltered) {
ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId);
ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, List.of(path), null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null);
ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null);
}

protected void writeAttribute(
Expand All @@ -131,7 +131,7 @@ protected void writeAttribute(
WriteAttributesCallbackJni jniCallback = new WriteAttributesCallbackJni(callback);
byte[] tlv = encodeToTlv(value);
AttributeWriteRequest writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlv);
ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, List.of(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue());
ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue());
}

protected void subscribeAttribute(
Expand All @@ -141,7 +141,7 @@ protected void subscribeAttribute(
int maxInterval) {
ReportCallbackJni jniCallback = new ReportCallbackJni(callback, callback, null);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId);
ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, List.of(path), null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null);
ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null);
}

protected void invoke(
Expand Down

0 comments on commit cc44387

Please sign in to comment.