[freenet-cvs] r12611 - trunk/freenet/src/freenet/support/io

nextgens at freenetproject.org nextgens at freenetproject.org
Thu Apr 12 16:16:21 UTC 2007


Author: nextgens
Date: 2007-04-12 16:16:20 +0000 (Thu, 12 Apr 2007)
New Revision: 12611

Modified:
   trunk/freenet/src/freenet/support/io/FileUtil.java
Log:
trivial: rename variables to something more meaningful

Modified: trunk/freenet/src/freenet/support/io/FileUtil.java
===================================================================
--- trunk/freenet/src/freenet/support/io/FileUtil.java	2007-04-12 15:19:28 UTC (rev 12610)
+++ trunk/freenet/src/freenet/support/io/FileUtil.java	2007-04-12 16:16:20 UTC (rev 12611)
@@ -37,14 +37,14 @@
 	 *  Is possParent a parent of filename?
 	 * Why doesn't java provide this? :(
 	 * */
-	public static boolean isParent(File possParent, File filename) {
-		File canonParent = FileUtil.getCanonicalFile(possParent);
+	public static boolean isParent(File poss, File filename) {
+		File canon = FileUtil.getCanonicalFile(poss);
 		File canonFile = FileUtil.getCanonicalFile(filename);
 
-		if(isParentInner(possParent, filename)) return true;
-		if(isParentInner(possParent, canonFile)) return true;
-		if(isParentInner(canonParent, filename)) return true;
-		if(isParentInner(canonParent, canonFile)) return true;
+		if(isParentInner(poss, filename)) return true;
+		if(isParentInner(poss, canonFile)) return true;
+		if(isParentInner(canon, filename)) return true;
+		if(isParentInner(canon, canonFile)) return true;
 		return false;
 	}
 
@@ -57,12 +57,12 @@
 	}
 	
 	public static File getCanonicalFile(File file){
-		File parentDirectory;
+		File result;
 		try {
-			parentDirectory = file.getCanonicalFile();
+			result = file.getCanonicalFile();
 		} catch (IOException e) {
-			parentDirectory = file.getAbsoluteFile();
+			result = file.getAbsoluteFile();
 		}
-		return parentDirectory;
+		return result;
 	}
 }




More information about the cvs mailing list