From c7b562040903cbf4cc7d9f395366d05e3c44ced1 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 24 Aug 2013 17:01:39 -0400 Subject: [PATCH] updates to ensure backward compatability with 1.6 Former-commit-id: be26000c68fbdc88c6c500db76b760e4d948885a --- .../concurrency/DirectorySpinLock.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/concurrency/DirectorySpinLock.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/concurrency/DirectorySpinLock.java index 60de62900..001f344bf 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/concurrency/DirectorySpinLock.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/concurrency/DirectorySpinLock.java @@ -40,7 +40,7 @@ import java.util.logging.Logger; * * @author Jeremy Long (jeremy.long@owasp.org) */ -public class DirectorySpinLock implements Closeable, AutoCloseable { +public class DirectorySpinLock implements Closeable /*, AutoCloseable*/ { /** * The name of the lock file. @@ -224,13 +224,14 @@ public class DirectorySpinLock implements Closeable, AutoCloseable { @Override public void close() throws IOException { release(); - if (lock != null) { - try { - lock.close(); - } catch (IOException ex) { - Logger.getLogger(DirectorySpinLock.class.getName()).log(Level.FINEST, "Unable to close file lock due to IO Exception", ex); - } - } +// TODO uncomment this once support for 1.6 is dropped. +// if (lock != null) { +// try { +// lock.close(); +// } catch (IOException ex) { +// Logger.getLogger(DirectorySpinLock.class.getName()).log(Level.FINEST, "Unable to close file lock due to IO Exception", ex); +// } +// } if (channel != null) { try { channel.close();