Skip to content
Merged
Show file tree
Hide file tree
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 @@ -41,7 +41,7 @@ protected Integer getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetCategory();
return getDomainObject() != null && getDomainObject().isSetCategory();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected String getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetCurrency();
return getDomainObject() != null && getDomainObject().isSetCurrency();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected String getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetPartyConfig();
return getDomainObject() != null && getDomainObject().isSetPartyConfig();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected Integer getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetPaymentInstitution();
return getDomainObject() != null && getDomainObject().isSetPaymentInstitution();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class PaymentRoutingRulesHandler

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetRoutingRules();
return getDomainObject() != null && getDomainObject().isSetRoutingRules();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected Integer getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetProvider();
return getDomainObject() != null && getDomainObject().isSetProvider();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected Integer getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetProxy();
return getDomainObject() != null && getDomainObject().isSetProxy();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected String getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetShopConfig();
return getDomainObject() != null && getDomainObject().isSetShopConfig();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected Integer getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetTermSetHierarchy();
return getDomainObject() != null && getDomainObject().isSetTermSetHierarchy();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected Integer getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetTerminal();
return getDomainObject() != null && getDomainObject().isSetTerminal();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

а эту проверку на null нельзя вынести в getDomainObject() ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

а эту проверку на null нельзя вынести в getDomainObject() ?

вынести проверить и вернуть оттуда null ? ))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

как раз вернуть объект точно НЕ null и проверить это в одном месте , а не в каждом handler)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

возвращать ведь нечего) там просто гетер, можно вернуть какой-нибудь optional но все равно проверять придется

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ага, глянул в код

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected String getTargetRefId() {

@Override
protected boolean acceptDomainObject() {
return getDomainObject().isSetWalletConfig();
return getDomainObject() != null && getDomainObject().isSetWalletConfig();
}

@Override
Expand Down
Loading