Skip to content

add link id regex field to services #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ian-Nara
Copy link
Contributor

No description provided.

@@ -57,6 +72,7 @@ public String toString() {
", siteId=" + siteId +
", name='" + name + '\'' +
", roles=" + roles +
", linkIdRegex=" + linkIdRegex +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it fail when linkIdRegex is null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, java handles the concatenation by automatically converting null to "null"

return serviceId == service.serviceId && siteId == service.siteId && name.equals(service.name) && roles.equals(service.roles);
boolean compare = serviceId == service.serviceId && siteId == service.siteId && name.equals(service.name) && roles.equals(service.roles);
if (linkIdRegex == null || service.linkIdRegex == null) {
return compare && linkIdRegex == service.linkIdRegex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use && Objects.equals(linkIdRegex, service.linkIdRegex) to skip the null tests.

@@ -30,6 +37,14 @@ public int getSiteId() {
return siteId;
}

public String getLinkIdRegex() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we move the new methods so that getSiteId and setSiteId are next to each other?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants