You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Sammi Chen (Jira)" <ji...@apache.org> on 2026/07/24 09:17:00 UTC

[jira] [Resolved] (HDDS-15950) S3 Gateway GetBucketLifecycleConfiguration throws NullPointerException when expiration uses Date or DaysAfterInitiation is absent

     [ https://issues.apache.org/jira/browse/HDDS-15950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sammi Chen resolved HDDS-15950.
-------------------------------
    Fix Version/s: 2.3.0
       Resolution: Fixed

> S3 Gateway GetBucketLifecycleConfiguration throws NullPointerException when expiration uses Date or DaysAfterInitiation is absent
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-15950
>                 URL: https://issues.apache.org/jira/browse/HDDS-15950
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: S3
>            Reporter: Priyesh Karatha
>            Assignee: Priyesh Karatha
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> {{S3LifecycleConfiguration.convertFromOzoneExpiration()}} calls {{ozoneExpiration.getDays() > 0}} (line 482). However, {{OzoneLifecycleConfiguration.OzoneLCExpiration.getDays()}} returns a nullable {{{}Integer{}}}. For lifecycle rules that specify an expiration date instead of a {{Days}} value, {{getDays()}} returns {{{}null{}}}. The subsequent comparison triggers auto-unboxing, resulting in a {{NullPointerException}} that propagates to the client as an HTTP 500 response.
> A similar issue exists in {{convertFromOzoneAbortIncompleteMultipartUpload()}} (line 500), where {{getDaysAfterInitiation()}} also returns a nullable {{Integer}} but is compared without a null check, making it susceptible to the same {{{}NullPointerException{}}}.
> There are currently no tests covering the GET lifecycle code path for rules that use date-based expiration. As a result, this bug was not detected by the existing test suite.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org