HHH-9528 close InputStreams in jpamodelgen JpaDescriptorParser

This commit is contained in:
Brett Meyer 2015-01-21 15:55:00 -05:00
parent f1a9a9f006
commit 7f17e50c72
1 changed files with 13 additions and 0 deletions

View File

@ -139,6 +139,13 @@ public class JpaDescriptorParser {
Diagnostic.Kind.WARNING, "Unable to parse persistence.xml: " + e.getMessage()
);
}
try {
stream.close();
} catch (IOException e) {
// eat it
}
return persistence;
}
@ -161,6 +168,12 @@ public class JpaDescriptorParser {
if ( mapping != null ) {
entityMappings.add( mapping );
}
try {
stream.close();
} catch (IOException e) {
// eat it
}
}
}