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

   ### What changes were proposed in this pull request?
   In `CreateFileset.java`, the `handle()` method directly called 
`properties.get("managed").equals("true")`, which could throw a 
`NullPointerException` if the `managed` property was missing.  
   This PR updates the code to use a null-safe check and defaults to external 
mode (`Fileset.Type.EXTERNAL`) when the property is not set.
   
   ### Why are the changes needed?
   Without this fix, missing `managed` properties could cause NPEs, breaking 
fileset creation.  
   Adding a null-safe check ensures that missing properties are handled 
gracefully and the command defaults to external mode.
   
   **Fix:** #8083
   
   ### Does this PR introduce any user-facing change?
   No. Valid requests behave the same. Invalid or missing `managed` properties 
are now safely handled without throwing exceptions.
   
   ### How was this patch tested?
   - Manually verified locally that creating filesets without the `managed` 
property defaults to external mode.  
   - Added unit test (or can be added) to ensure that missing `managed` 
properties do not cause exceptions.


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