When getting an object from an S3 bucket with "ifNoneMatch", an exception is thrown if the eTag matches.
ResponseInputStream
Not throwing an exception, instead only return the status code 304 and null InputStream when eTag matches.
See https://forums.aws.amazon.com/thread.jspa?threadID=77995&tstart=0
We'll start a thread with the rest of the AWS SDKs to determine how we should correctly handle this behavior.
I agree that an exception is pretty heavy-weight for this situation, which is unfortunate. It's also not made clear at all in the documentation, and it's not a specific exception class, so you have to catch all S3Exception and then check the status code to be able to use it. It's a very disappointing step backwards from the V1 SDK (even if returning null is a bit ugly, it's at least cheap and easy to document).
Most helpful comment
I agree that an exception is pretty heavy-weight for this situation, which is unfortunate. It's also not made clear at all in the documentation, and it's not a specific exception class, so you have to catch all S3Exception and then check the status code to be able to use it. It's a very disappointing step backwards from the V1 SDK (even if returning null is a bit ugly, it's at least cheap and easy to document).