Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ public List<EventMeshDataInfo> findEventMeshInfoByCluster(String clusterName) th
EventMeshInstance eventMeshInstance = JsonUtils.parseObject(new String(data, StandardCharsets.UTF_8), EventMeshInstance.class);

EventMeshDataInfo eventMeshDataInfo =
new EventMeshDataInfo(clusterName, serviceName, endpoint, stat.getMtime(), eventMeshInstance.getMetaData());
new EventMeshDataInfo(clusterName, serviceName, endpoint, stat.getMtime(),
Objects.requireNonNull(eventMeshInstance, "instance must not be Null").getMetaData());

eventMeshDataInfoList.add(eventMeshDataInfo);
}
Expand Down Expand Up @@ -203,7 +204,8 @@ public List<EventMeshDataInfo> findAllEventMeshInfo() throws RegistryException {
EventMeshInstance eventMeshInstance = JsonUtils.parseObject(new String(data, StandardCharsets.UTF_8), EventMeshInstance.class);

EventMeshDataInfo eventMeshDataInfo =
new EventMeshDataInfo(clusterName, serviceName, endpoint, stat.getMtime(), eventMeshInstance.getMetaData());
new EventMeshDataInfo(clusterName, serviceName, endpoint, stat.getMtime(),
Objects.requireNonNull(eventMeshInstance, "instance must not be Null").getMetaData());

eventMeshDataInfoList.add(eventMeshDataInfo);
}
Expand Down Expand Up @@ -256,7 +258,8 @@ public boolean register(EventMeshRegisterInfo eventMeshRegisterInfo) throws Regi
.orSetData()
.creatingParentsIfNeeded()
.withMode(CreateMode.EPHEMERAL)
.forPath(path, JsonUtils.toJSONString(eventMeshInstance).getBytes(StandardCharsets.UTF_8));
.forPath(path,
Objects.requireNonNull(JsonUtils.toJSONString(eventMeshInstance), "instance must not be Null").getBytes(StandardCharsets.UTF_8));

eventMeshRegisterInfoMap.put(eventMeshName, eventMeshRegisterInfo);
} catch (Exception e) {
Expand Down