From 8f647622f0f5243ba96df7c23149abe1f0f85738 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 19 Feb 2014 18:59:37 +0000 Subject: [PATCH] * HACK to keep things working on Java 6 --- source/net/sourceforge/tuned/FileUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/sourceforge/tuned/FileUtilities.java b/source/net/sourceforge/tuned/FileUtilities.java index fecf2661..2d118af0 100644 --- a/source/net/sourceforge/tuned/FileUtilities.java +++ b/source/net/sourceforge/tuned/FileUtilities.java @@ -55,7 +55,7 @@ public final class FileUtilities { // * On Windows ATOMIC_MOVE allows us to rename files even if only lower/upper-case changes (without ATOMIC_MOVE the operation would be ignored) try { java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE); - } catch (Exception e) { + } catch (IOException e) { // HACK to keep things working on Java 6 if (e.getClass().getName().contains("AtomicMoveNotSupported")) { java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);