You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "JeonDaehong (via GitHub)" <gi...@apache.org> on 2025/08/21 12:05:24 UTC

[PR] [#8168] Fix NPE in EntityCombinedFileset by initializing hiddenProperties field [gravitino]

JeonDaehong opened a new pull request, #8238:
URL: https://github.com/apache/gravitino/pull/8238

   **What changes were proposed in this pull request?**
   In `EntityCombinedFileset.java`, the `properties()` method directly called `hiddenProperties.contains()` without null checking, which could throw a `NullPointerException` if `hiddenProperties` was not initialized. This PR updates the code to initialize `hiddenProperties` with an empty set and adds null-safe handling in the `withHiddenProperties()` method.
   
   **Why are the changes needed?**
   Without this fix, calling `properties()` on an `EntityCombinedFileset` instance before setting hidden properties could cause NPEs, breaking fileset property retrieval. Adding proper initialization ensures that the object is always in a valid state and handles missing hidden properties gracefully.
   
   Fixes #8168
   
   **Does this PR introduce any user-facing change?**
   No. Valid requests behave the same. Cases where `hiddenProperties` was not explicitly set are now safely handled without throwing exceptions.
   
   **How was this patch tested?**
   * Added unit tests to verify that calling `properties()` without setting hidden properties does not cause exceptions
   * Added tests to ensure null input to `withHiddenProperties()` is handled safely
   * Added tests to verify that hidden property filtering works correctly when properties are set
   * Verified that existing functionality remains unchanged


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#8168] Fix NPE in EntityCombinedFileset by initializing hiddenProperties field [gravitino]

Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong commented on PR #8238:
URL: https://github.com/apache/gravitino/pull/8238#issuecomment-3212622971

   > Thanks for fixing this.
   
   Is there a specific time for proceeding with the merge?


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#8168] Fix NPE in EntityCombinedFileset by initializing hiddenProperties field [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean merged PR #8238:
URL: https://github.com/apache/gravitino/pull/8238


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#8168] Fix NPE in EntityCombinedFileset by initializing hiddenProperties field [gravitino]

Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong commented on PR #8238:
URL: https://github.com/apache/gravitino/pull/8238#issuecomment-3212178277

   @justinmclean 
   Hello! The tests have passed. If there are no issues, I kindly request a merge.


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#8168] Fix NPE in EntityCombinedFileset by initializing hiddenProperties field [gravitino]

Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong commented on PR #8238:
URL: https://github.com/apache/gravitino/pull/8238#issuecomment-3210329244

   @justinmclean 
   
   Hello, I’ve submitted the PR. Please review it.
   
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org