priyeshkaratha opened a new pull request, #10850: URL: https://github.com/apache/ozone/pull/10850
## What changes were proposed in this pull request? When converting an Ozone lifecycle configuration back to the S3 response model, `convertFromOzoneExpiration` and `convertFromOzoneAbortIncompleteMultipartUpload` called `getDays()` and `getDaysAfterInitiation()` directly in a `> 0` comparison. These accessors return boxed `Integer` values that are `null` for date-based rules (which have a `Date` but no `Days`), so unboxing threw a `NullPointerException` on a `GET` of the lifecycle configuration. This adds a null check before the `> 0` comparison in both methods so date-based expiration rules are returned correctly. ## What is the link to the Apache JIRA HDDS-15950 ## How was this patch tested? Tested using added unit test -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
