MRgenial commented on code in PR #2635:
URL: https://github.com/apache/hertzbeat/pull/2635#discussion_r1741014275
##########
common/src/main/java/org/apache/hertzbeat/common/entity/manager/Tag.java:
##########
@@ -78,7 +78,7 @@ public class Tag {
accessMode = READ_WRITE)
@Min(0)
@Max(3)
- private byte type;
+ private Byte type;
Review Comment:
> btw, we need make sure `Byte type` can not null, due here will throws a
NullPointerException since null cannot be converted to a primitive value.
>
> ```
> List<Tag> tags = monitor.getTags().stream().filter(tag -> tag.getType() ==
(byte) 0).collect(Collectors.toList());
> ```
Okay, i will check it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]