mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 00:29:21 +01:00
updates to ensure backward compatability with 1.6
Former-commit-id: be26000c68fbdc88c6c500db76b760e4d948885a
This commit is contained in:
@@ -40,7 +40,7 @@ import java.util.logging.Logger;
|
|||||||
*
|
*
|
||||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
* @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.
|
* The name of the lock file.
|
||||||
@@ -224,13 +224,14 @@ public class DirectorySpinLock implements Closeable, AutoCloseable {
|
|||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
release();
|
release();
|
||||||
if (lock != null) {
|
// TODO uncomment this once support for 1.6 is dropped.
|
||||||
try {
|
// if (lock != null) {
|
||||||
lock.close();
|
// try {
|
||||||
} catch (IOException ex) {
|
// lock.close();
|
||||||
Logger.getLogger(DirectorySpinLock.class.getName()).log(Level.FINEST, "Unable to close file lock due to IO Exception", ex);
|
// } catch (IOException ex) {
|
||||||
}
|
// Logger.getLogger(DirectorySpinLock.class.getName()).log(Level.FINEST, "Unable to close file lock due to IO Exception", ex);
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
if (channel != null) {
|
if (channel != null) {
|
||||||
try {
|
try {
|
||||||
channel.close();
|
channel.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user