andrewmkhoury commented on code in PR #26:
URL:
https://github.com/apache/sling-org-apache-sling-event/pull/26#discussion_r1181003628
##########
src/main/java/org/apache/sling/event/impl/jobs/queues/JobExecutionContextImpl.java:
##########
@@ -84,6 +84,22 @@ public void updateProgress(final long eta) {
}
}
+ @Override
+ public void setProperty(final String name, final Object value) {
+ if ( name == null ) {
+ throw new IllegalArgumentException("Name must not be null");
Review Comment:
I had thought of using `@NonNull` too but it meant I need to introduce a new
dependency to this project and org.apache.sling.event.api project. WDYT?
```
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
```
Also, note that @Nonnull isn't perfect at blocking null parameters from
getting passed, so it still make sense to keep the null checks. See here for
details:
https://stackoverflow.com/questions/13484202/how-to-use-nullable-and-nonnull-annotations-more-effectively/46290602#46290602
--
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]