Akanksha-kedia opened a new pull request, #18455:
URL: https://github.com/apache/pinot/pull/18455

   ## Summary
   
   `getOfflineInstanceFromExternalView()` iterates directly over 
`resourceExternalView.getPartitionSet()` without a null guard. Passing a `null` 
`ExternalView` (e.g. when the resource has not yet been created in Helix) 
throws a `NullPointerException`.
   
   The sibling method `getOnlineInstanceFromExternalView()` already has the 
correct null guard:
   ```java
   if (resourceExternalView != null) { ... }
   ```
   This PR applies the same pattern to `getOfflineInstanceFromExternalView()` 
so both methods are consistent and callers get an empty set instead of an NPE.
   
   ## Test plan
   
   - [ ] Existing unit tests pass
   - [ ] Passing `null` returns an empty set (matches 
`getOnlineInstanceFromExternalView` behaviour)


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