Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit ed435c7

Browse files
committed
1 - Null exception in ApplicationInformation.setRegistrationToken
2 - Removed duplicates in the construction of the BatchLists
1 parent 6e3e7fa commit ed435c7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/main/java/org/energyos/espi/common/domain/ApplicationInformation.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,11 @@ public java.lang.Object getRegistrationAccessToken() {
12621262
}
12631263

12641264
private void setRegistrationAccessToken(java.lang.Object registrationAccessToken) {
1265-
this.registrationAccessToken = registrationAccessToken.toString();
1265+
if (registrationAccessToken != null) {
1266+
this.registrationAccessToken = registrationAccessToken.toString();
1267+
} else {
1268+
this.registrationAccessToken = null;
1269+
}
12661270
}
12671271

12681272
/**

src/main/java/org/energyos/espi/common/service/impl/NotificationServiceImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ public void notifyAllNeed() {
173173
notifyList.get(id).getResources().add(bulkResourceUri);
174174
}
175175
} else {
176-
// just add the resourceUri
177-
notifyList.get(id).getResources().add(resourceUri);
176+
// just add the resourceUri
177+
if (!(notifyList.get(id).getResources().contains(resourceUri))) {
178+
notifyList.get(id).getResources().add(resourceUri);
179+
}
178180
}
179181
}
180182
}

0 commit comments

Comments
 (0)