divijaksolves opened a new pull request, #11810:
URL: https://github.com/apache/nifi/pull/11810

   ### Description
   Fixes [NIFI-16454](https://issues.apache.org/jira/browse/NIFI-16454) by 
adding an explicit null check for `moduleName` inside 
`AllowListClassLoader.isModuleAllowed()`. For classes belonging to the unnamed 
module on the classpath, `Module.getName()` evaluates to `null`, which 
previously caused a `NullPointerException` during `moduleName.startsWith(...)`.
   
   ### Changes
   - Updated `AllowListClassLoader.isModuleAllowed()` to package-private to 
enable direct unit testing, and added a null check returning `false`.
   - Added `TestAllowListClassLoader` covering:
     - `isModuleAllowed(null)` asserting it safely returns `false` without 
throwing an NPE.
     - Classes from allowed Java base modules.
     - Classes explicitly included in the allow-list set.
   
   ### Tracking
   - Jira: https://issues.apache.org/jira/browse/NIFI-16454


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