vigneshio opened a new pull request, #4825:
URL: https://github.com/apache/polaris/pull/4825

   Fix NPE when root container resolution returns null in 
PolarisResolutionManifest
   
   In PolarisResolutionManifest, getResolvedRootContainerEntity() is @Nullable 
and can return null (it also logs a warning).
   
   Three places were passing this directly into List.of() or list.add() without 
any check:
   - getResolvedRootContainerEntityAsPath()
   - getResolvedReferenceCatalogEntity() (when prependRootContainer is true)
   - getResolvedPath() (when prependRootContainer is true)
   
   This caused NullPointerException because List.of(null) is not allowed.
   
   Fixed by adding simple null guards (same pattern already used elsewhere in 
the same file for getResolvedTopLevelEntity).
   
   ## Checklist
   - [ ]  Don't disclose security issues! (contact [email protected])
   - [x] Clearly explained why the changes are needed, or linked related issues
   - [ ] 🧪 Added/updated tests with good coverage, or manually tested (and 
explained how) -- small defensive null guard, follows existing pattern in the 
file, no new test added
   - [x] Added comments for complex logic
   - [x] 🧾 Updated `CHANGELOG.md` (if needed)
   - [ ] Updated documentation in `site/content/in-dev/unreleased` (if needed)


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

Reply via email to