Skip to content

Commit 218851e

Browse files
committed
HHH-9528 close InputStreams in jpamodelgen JpaDescriptorParser
1 parent 8e84c7d commit 218851e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tooling/metamodel-generator/src/main/java/org/hibernate/jpamodelgen/xml/JpaDescriptorParser.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ private Persistence getPersistence() {
139139
Diagnostic.Kind.WARNING, "Unable to parse persistence.xml: " + e.getMessage()
140140
);
141141
}
142+
143+
try {
144+
stream.close();
145+
} catch (IOException e) {
146+
// eat it
147+
}
148+
142149
return persistence;
143150
}
144151

@@ -161,6 +168,12 @@ private void loadEntityMappings(Collection<String> mappingFileNames) {
161168
if ( mapping != null ) {
162169
entityMappings.add( mapping );
163170
}
171+
172+
try {
173+
stream.close();
174+
} catch (IOException e) {
175+
// eat it
176+
}
164177
}
165178
}
166179

0 commit comments

Comments
 (0)