Skip to content

Fix for empty domain object#110

Merged
strug merged 6 commits intomasterfrom
ft/up-lib-dominant
Mar 18, 2026
Merged

Fix for empty domain object#110
strug merged 6 commits intomasterfrom
ft/up-lib-dominant

Conversation

@strug
Copy link
Copy Markdown
Contributor

@strug strug commented Mar 18, 2026

No description provided.

@strug strug requested a review from a team as a code owner March 18, 2026 10:44
@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.

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

@strug strug merged commit d2ec45a into master Mar 18, 2026
10 of 14 checks passed
@strug strug deleted the ft/up-lib-dominant branch March 18, 2026 11:37
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.

2 participants