You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Several methods of the S3Resource object throw IOExceptions in their signature. But Exception is never thrown in those methods.
Use cases where this is a problem :
I use listObject() method in S3Template. I want to use contentLength or lastModified fields of S3Resource to sort the list, but I need to catch IOException in the comparator.
Maybe I missed something but I think that we can remove them.
Describe the solution you'd like
Remove IOException declaration in method signatures in S3Resource.
I know that S3Resource inherits AbstractResource. So I don't know if it is a problem for you to remove the exception in some S3Resource methods. Moreover, most uses of S3Resource are made via the S3Template, so there's no reference to the parent class.
If it is ok for you, you can assign me the ticket, I can make a PR quickly.
Additional context
Some examples :
@Override
public long contentLength() throws IOException {
if (headMetadata == null) {
fetchMetadata();
}
return headMetadata.contentLength;
}
@Override
public long lastModified() throws IOException {
if (headMetadata == null) {
fetchMetadata();
}
return headMetadata.lastModified.toEpochMilli();
}
The text was updated successfully, but these errors were encountered:
Type: Feature
Is your feature request related to a problem? Please describe.
Several methods of the S3Resource object throw IOExceptions in their signature. But Exception is never thrown in those methods.
Use cases where this is a problem :
I use
listObject()
method inS3Template
. I want to usecontentLength
orlastModified
fields ofS3Resource
to sort the list, but I need to catch IOException in the comparator.Maybe I missed something but I think that we can remove them.
Describe the solution you'd like
Remove IOException declaration in method signatures in
S3Resource
.I know that
S3Resource
inheritsAbstractResource
. So I don't know if it is a problem for you to remove the exception in someS3Resource
methods. Moreover, most uses ofS3Resource
are made via theS3Template
, so there's no reference to the parent class.If it is ok for you, you can assign me the ticket, I can make a PR quickly.
Additional context
Some examples :
The text was updated successfully, but these errors were encountered: