SdkFilterInputStream.close should not abort
- Lingua principale
- Java
- Stelle
- 2.6k
- Fork
- 1k
- Merge medio
- 2g 9h
- PR unite (30g)
- 51
Descrizione
### Describe the bug
`SdkFilterInputStream.close`, like all other overrides in `SdkFilterInputStream`, calls `abortIfNeeded`. That method throws an `AbortedException` if the current is thread interrupted. Given that `.close()` is usually called when on a cleanup path anyway, is this necessary? Usually `close()` methods should just try to clean up and return with as little fanfare as possible. `AbortedException` is also an unchecked exception so it may bypass any code anticipating `IOException`.
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Expected Behavior
Closing a `SdkFilterInputStream` doesn't throw exceptions it doesn't have to.
### Current Behavior
`SdkFilterInputStream.close` may throw `AbortedException`.
### Reproduction Steps
I hope the problem is clear from the description.
### Possible Solution
Delete the `SdkFilterInputStream.close` override.
### Additional Information/Context
_No response_
### AWS Java SDK version used
2.42.33
### JDK version used
any
### Operating System and version
any
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.