You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "klcodanr (via GitHub)" <gi...@apache.org> on 2023/04/21 15:28:18 UTC
[GitHub] [sling-org-apache-sling-event] klcodanr commented on a diff in pull request #26: SLING-11831 - Allow setting job properties for custom job state
klcodanr commented on code in PR #26:
URL: https://github.com/apache/sling-org-apache-sling-event/pull/26#discussion_r1173908716
##########
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:
Optional, this could be simplfied with:
Objects.requireNonNull(name, "Name must not be null")
But this would throw a NPE (with the supplied message) rather that an IllegalArgumentMessage.
https://docs.oracle.com/javase/8/docs/api/java/util/Objects.html#requireNonNull-T-java.lang.String-
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org