Skip to content

Handle null value in io.minio.messages.Item.lastModified() method#1605

Merged
harshavardhana merged 3 commits intominio:masterfrom
hwaite:lastmodified-npe
Jan 16, 2025
Merged

Handle null value in io.minio.messages.Item.lastModified() method#1605
harshavardhana merged 3 commits intominio:masterfrom
hwaite:lastmodified-npe

Conversation

@hwaite
Copy link
Copy Markdown
Contributor

@hwaite hwaite commented Dec 21, 2024

Avert exception:

java.lang.NullPointerException: Cannot invoke "io.minio.messages.ResponseDate.zonedDateTime()" because "this.lastModified" is null.

Null values occur when doing a non-recursive, prefixed 'listObjects' call.

Comment thread api/src/main/java/io/minio/messages/Item.java Outdated
Comment thread api/src/main/java/io/minio/messages/Item.java Outdated
Comment thread api/src/main/java/io/minio/messages/Item.java Outdated
@balamurugana balamurugana changed the title Guard against NullPointerException for null Item.lastModified. Handle null value in io.minio.messages.Item.lastModified() method Jan 7, 2025
Comment thread api/src/main/java/io/minio/messages/Item.java Outdated
Comment thread api/src/main/java/io/minio/messages/Item.java Outdated
@harshavardhana harshavardhana merged commit 51940f6 into minio:master Jan 16, 2025
@hwaite hwaite deleted the lastmodified-npe branch January 16, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants