HHH-9528 close InputStreams in jpamodelgen JpaDescriptorParser

This commit is contained in:
Brett Meyer 2015-01-21 15:55:00 -05:00
parent 8e84c7d896
commit 218851e6fe
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
}
}
}