From 719777b2a74975b0b0fac0caf7e3ae1bf579af63 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 3 Jul 2011 18:13:37 +0000 Subject: [PATCH] replaced method to call getUsableSpace using reflection with direct call since we now use java 1.6 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7821 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/crawler/ResourceObserver.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/crawler/ResourceObserver.java b/source/de/anomic/crawler/ResourceObserver.java index f6b036484..c9b6cf641 100644 --- a/source/de/anomic/crawler/ResourceObserver.java +++ b/source/de/anomic/crawler/ResourceObserver.java @@ -25,8 +25,6 @@ package de.anomic.crawler; import java.io.File; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; import net.yacy.kelondro.logging.Log; import net.yacy.kelondro.util.MemoryControl; @@ -110,7 +108,8 @@ public class ResourceObserver { * */ private Space getNormalizedDiskFree() { - final long currentSpace = getUsableSpace(this.path); + final long currentSpace = this.path.getUsableSpace(); + //final long currentSpace = getUsableSpace(this.path); if (currentSpace < 1L) return Space.HIGH; Space ret = Space.HIGH; @@ -171,6 +170,7 @@ public class ResourceObserver { * @return "The number of available bytes on the partition or 0L if the abstract pathname does not name a partition." -1L on error. * @author lotus at mail.berlios.de */ + /** public static long getUsableSpace(final File file) { try { final Class File6 = Class.forName("java.io.File"); @@ -184,5 +184,5 @@ public class ResourceObserver { return -1L; } } - + */ }