galovics commented on code in PR #2652:
URL: https://github.com/apache/fineract/pull/2652#discussion_r993271727
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java:
##########
@@ -83,64 +92,14 @@ private MulticastResult(Builder builder) {
retryMulticastIds = Collections.unmodifiableList(tmpList);
}
- /**
- * Gets the multicast id.
- */
- public long getMulticastId() {
- return multicastId;
- }
-
- /**
- * Gets the number of successful messages.
- */
- public int getSuccess() {
- return success;
- }
-
- /**
- * Gets the total number of messages sent, regardless of the status.
- */
- public int getTotal() {
- return success + failure;
- }
-
- /**
- * Gets the number of failed messages.
- */
- public int getFailure() {
- return failure;
- }
-
- /**
- * Gets the number of successful messages that also returned a canonical
registration id.
- */
- public int getCanonicalIds() {
- return canonicalIds;
- }
-
- /**
- * Gets the results of each individual message, which is immutable.
- */
- public List<Result> getResults() {
- return results;
- }
-
- /**
- * Gets additional ids if more than one multicast message was sent.
- */
- public List<Long> getRetryMulticastIds() {
- return retryMulticastIds;
- }
-
@Override
public String toString() {
Review Comment:
You can replace the toString with a @ToString lombok annotation.
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/DeviceRegistration.java:
##########
@@ -42,40 +49,8 @@ public final class DeviceRegistration extends
AbstractPersistableCustom {
@Column(name = "updatedon_date", nullable = false)
private LocalDateTime updatedOnDate;
- private DeviceRegistration() {}
-
- private DeviceRegistration(final Client client, final String
registrationId) {
- this.client = client;
- this.registrationId = registrationId;
- this.updatedOnDate = DateUtils.getLocalDateTimeOfTenant();
- }
-
public static DeviceRegistration instance(final Client client, final
String registrationId) {
- return new DeviceRegistration(client, registrationId);
- }
-
- public Client getClient() {
- return this.client;
- }
-
- public void setClient(Client client) {
- this.client = client;
- }
-
- public String getRegistrationId() {
- return this.registrationId;
- }
-
- public void setRegistrationId(String registrationId) {
- this.registrationId = registrationId;
- }
-
- public LocalDateTime getUpdatedOnDate() {
- return this.updatedOnDate;
- }
-
- public void setUpdatedOnDate(LocalDateTime updatedOnDate) {
- this.updatedOnDate = updatedOnDate;
+ return new
DeviceRegistration().setRegistrationId(registrationId).setClient(client);
Review Comment:
`this.updatedOnDate = DateUtils.getLocalDateTimeOfTenant(); ` -> this is
missing according to the original constructor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]