You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/10/11 22:09:44 UTC
[GitHub] [fineract] hmg65 opened a new pull request, #2652: FINERACT-1765: Introduce Lombok to gcm module
hmg65 opened a new pull request, #2652:
URL: https://github.com/apache/fineract/pull/2652
## Description
Describe the changes made and why they were made.
Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
## Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [ ] Write the commit message as per https://github.com/apache/fineract/#pull-requests
- [ ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
- [ ] Create/update unit or integration tests for verifying the changes made.
- [ ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
- [ ] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] hmg65 commented on a diff in pull request #2652: FINERACT-1765: Introduce Lombok to gcm module
Posted by GitBox <gi...@apache.org>.
hmg65 commented on code in PR #2652:
URL: https://github.com/apache/fineract/pull/2652#discussion_r993306827
##########
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:
done
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] galovics commented on a diff in pull request #2652: FINERACT-1765: Introduce Lombok to gcm module
Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] hmg65 commented on a diff in pull request #2652: FINERACT-1765: Introduce Lombok to gcm module
Posted by GitBox <gi...@apache.org>.
hmg65 commented on code in PR #2652:
URL: https://github.com/apache/fineract/pull/2652#discussion_r993307105
##########
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:
@toString is already included in @Data annotation
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] galovics merged pull request #2652: FINERACT-1765: Introduce Lombok to gcm module
Posted by GitBox <gi...@apache.org>.
galovics merged PR #2652:
URL: https://github.com/apache/fineract/pull/2652
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org