suneet-s commented on a change in pull request #9892:
URL: https://github.com/apache/druid/pull/9892#discussion_r427700234
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/common/task/TaskResource.java
##########
@@ -37,6 +37,7 @@ public TaskResource(
)
{
this.availabilityGroup = Preconditions.checkNotNull(availabilityGroup,
"availabilityGroup");
+ Preconditions.checkArgument(requiredCapacity > 0);
Review comment:
just curious: How do we decide between using `@Min` and `@Nonnull`
annotations on the constructor vs adding an explicit Preconditions check? Is
there an advantage to one over another?
fwiw: I think annotations are easier to read than Preconditions, but I see
we use both, so I'm not advocating for one way or another, just curious what
your thoughts are
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]