-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(Message): create Message#getCommand method
#1518
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
base: dev
Are you sure you want to change the base?
Conversation
| public String getCommand() { | ||
| return Stream.ofNullable(entities) | ||
| .flatMap(Collection::stream) | ||
| .filter(entity -> entity != null && NumberUtils.INTEGER_ZERO.equals(entity.getOffset())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think we need a whole new import to check a number vs 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's nothing wrong with importing constants. It's a bad practice to use magic numbers.
52a184e to
9203912
Compare
…tter performance in `Message#getCommand` method
|
Hi @rubenlagus
Could you please review the PR? |
Message#isCommandfelt lonely, so I addedMessage#getCommandfor company