Skip to content

Commit 8bf7d58

Browse files
committed
Update Content app nullptrs
1 parent 04a996d commit 8bf7d58

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/model/ContentApp.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void setEndpointId(int endpoint) {
6767
}
6868

6969
public Set<SupportedCluster> getSupportedClusters() {
70-
return Collections.unmodifiableSet(supportedClusters);
70+
return supportedClusters != null ? Collections.unmodifiableSet(supportedClusters) : Collections.EMPTY_SET;
7171
}
7272

7373
public String getVersion() {

examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/AppPlatformService.java

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ private Collection<ContentAppSupportedCluster> mapSupportedClusters(
198198
Collection<SupportedCluster> supportedClusters) {
199199
return supportedClusters
200200
.stream()
201+
.filter(Objects::nonNull)
201202
.map(AppPlatformService::mapSupportedCluster)
202203
.collect(Collectors.toList());
203204
}

0 commit comments

Comments
 (0)