nddipiazza opened a new pull request, #2483:
URL: https://github.com/apache/tika/pull/2483

   ## Problem
   
   The `TikaGrpcServerImpl` uses `ObjectMapper.setDefaultPropertyInclusion()` 
which is deprecated and will be removed in Jackson 3.0.
   
   ## Solution
   
   Updated to use the `JsonMapper.builder()` pattern which is:
   - Compatible with Jackson 2.x (current version 2.20.1)
   - Forward-compatible with Jackson 3.0
   - Removes deprecation warning
   
   **Changes:**
   ```java
   // Before (deprecated):
   private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
   static {
       OBJECT_MAPPER.setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL);
   }
   
   // After (Jackson 3.0 ready):
   private static final ObjectMapper OBJECT_MAPPER = JsonMapper.builder()
           
.defaultPropertyInclusion(JsonInclude.Value.construct(JsonInclude.Include.NON_NULL,
 JsonInclude.Include.NON_NULL))
           .build();
   ```
   
   ## Testing
   
   - ✅ `mvn clean compile` succeeds without warnings
   - ✅ No deprecation warnings
   - ✅ Behavior remains unchanged (non-null property inclusion)
   
   Fixes: [TIKA-4589](https://issues.apache.org/jira/browse/TIKA-4589)


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