somu-imply commented on code in PR #13085:
URL: https://github.com/apache/druid/pull/13085#discussion_r1003506965


##########
core/src/main/java/org/apache/druid/guice/GuiceInjectableValues.java:
##########
@@ -50,7 +59,21 @@ public Object findInjectableValue(
     // Currently we should only be dealing with `Key` instances, and anything 
more advanced should be handled with
     // great care
     if (valueId instanceof Key) {
-      return injector.getInstance((Key) valueId);
+      try {
+        return injector.getInstance((Key) valueId);
+      }
+      catch (ConfigurationException ce) {
+        // check if nullable annotation is present for this
+        if (nullables.get().contains((Key) valueId)) {
+          return null;
+        } else if (forProperty.getAnnotation(Nullable.class) != null) {
+          HashSet<Key> encounteredNullables = nullables.get();
+          encounteredNullables.add((Key) valueId);

Review Comment:
   Addressed



-- 
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]

Reply via email to