kfaraz commented on code in PR #16281:
URL: https://github.com/apache/druid/pull/16281#discussion_r1567442192
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:
##########
@@ -316,7 +317,7 @@ public TaskStatus call()
if (propName.startsWith(CHILD_PROPERTY_PREFIX)) {
command.addSystemProperty(
propName.substring(CHILD_PROPERTY_PREFIX.length()),
- task.getContextValue(propName)
+
Preconditions.checkNotNull(task.getContextValue(propName), propName).toString()
Review Comment:
I don't think we should throw an exception. Maybe a property was set to
`null` on purpose. We should just use the value of null.
Maybe something like this:
```java
if (propName.startsWith(CHILD_PROPERTY_PREFIX)) {
final String contextValue = task.getContextValue(propName);
command.addSystemProperty(
propName.substring(CHILD_PROPERTY_PREFIX.length()),
contextValue == null ? null : contextValue.toString()
);
}
```
--
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]