Removed specific dependency on method signature that depended on SLF4J

This commit is contained in:
nathan 2018-08-18 20:06:49 +02:00
parent cc9a207777
commit 0be83f2e0c
1 changed files with 28 additions and 4 deletions

View File

@ -285,7 +285,13 @@ class Extension {
} catch (FileNotFoundException ignored) { } catch (FileNotFoundException ignored) {
} catch (IOException ignored) { } catch (IOException ignored) {
} finally { } finally {
IO.close(bin, logger); if (bin != null) {
try {
bin.close();
} catch (IOException e) {
logger.error("Error closing: {}", bin, e);
}
}
} }
@ -333,7 +339,13 @@ class Extension {
} catch (IOException e) { } catch (IOException e) {
logger.error("Error installing extension metadata file", e); logger.error("Error installing extension metadata file", e);
} finally { } finally {
IO.close(outputWriter, logger); if (outputWriter != null) {
try {
outputWriter.close();
} catch (IOException e) {
logger.error("Error closing: {}", outputWriter, e);
}
}
} }
@ -357,8 +369,20 @@ class Extension {
} catch (IOException e) { } catch (IOException e) {
logger.error("Unable to get gnome-shell extension", e); logger.error("Unable to get gnome-shell extension", e);
} finally { } finally {
IO.close(reader, logger); if (reader != null) {
IO.close(fileOutputStream, logger); try {
reader.close();
} catch (IOException e) {
logger.error("Error closing: {}", reader, e);
}
}
if (fileOutputStream != null) {
try {
fileOutputStream.close();
} catch (IOException e) {
logger.error("Error closing: {}", fileOutputStream, e);
}
}
} }
logger.debug("Enabling extension in gnome-shell"); logger.debug("Enabling extension in gnome-shell");