Skip to content

Commit c04fa85

Browse files
committed
Partially revert e1200f3
Syntax for this try-with-resources use case only permitted on Java 9+.
1 parent c3ce4f0 commit c04fa85

File tree

1 file changed

+4
-1
lines changed
  • spring-context-indexer/src/main/java/org/springframework/context/index/processor

1 file changed

+4
-1
lines changed

spring-context-indexer/src/main/java/org/springframework/context/index/processor/MetadataStore.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ public void writeMetadata(CandidateComponentsMetadata metadata) throws IOExcepti
6262

6363

6464
private CandidateComponentsMetadata readMetadata(InputStream in) throws IOException {
65-
try (in) {
65+
try {
6666
return PropertiesMarshaller.read(in);
6767
}
68+
finally {
69+
in.close();
70+
}
6871
}
6972

7073
private FileObject getMetadataResource() throws IOException {

0 commit comments

Comments
 (0)