HHH-13303 Fix formatting and add proper logger guard

This commit is contained in:
Sanne Grinovero 2019-07-11 21:11:41 +01:00
parent 4d301b1726
commit b9707c7df3
1 changed files with 4 additions and 2 deletions

View File

@ -117,8 +117,10 @@ public class CacheableFileXmlSource extends XmlSource {
}
private static void writeSerFile(Serializable binding, File xmlFile, File serFile) {
try (FileOutputStream fos = new FileOutputStream( serFile )){
log.debugf( "Writing cache file for: %s to: %s", xmlFile.getAbsolutePath(), serFile.getAbsolutePath() );
try ( FileOutputStream fos = new FileOutputStream( serFile ) ) {
if ( log.isDebugEnabled() ) {
log.debugf( "Writing cache file for: %s to: %s", xmlFile.getAbsolutePath(), serFile.getAbsolutePath() );
}
SerializationHelper.serialize( binding, fos );
boolean success = serFile.setLastModified( System.currentTimeMillis() );
if ( !success ) {