Skip to content

Implement java.io.Closeable where appropriate [SPR-9962] #14596

@spring-projects-issues

Description

@spring-projects-issues

Stuart Gunter opened SPR-9962 and commented

It would be useful if relevant classes within the Spring Framework would implement java.io.Closeable, as this would allow them to be automatically closed within try-with-resources blocks as well as Apache Commons / Google Guava's closeQuietly() methods.

One example within the Spring Framework that might benefit from this is org.springframework.http.client.ClientHttpResponse.

Perhaps a good starting point would be to identify any classes that provide a close() method and evaluate whether these are suitable candidates?


Affects: 3.1.3

Issue Links:

Referenced from: commits f5080f7, ea95da1

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions