incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1386540 - /incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileUtil.java
Date Mon, 17 Sep 2012 10:16:58 GMT
Author: liuzhe
Date: Mon Sep 17 10:16:58 2012
New Revision: 1386540

URL: http://svn.apache.org/viewvc?rev=1386540&view=rev
Log:
#120987 - Enable test automation framework to group test cases. Part 1

Modified:
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileUtil.java

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileUtil.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileUtil.java?rev=1386540&r1=1386539&r2=1386540&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileUtil.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileUtil.java Mon
Sep 17 10:16:58 2012
@@ -785,6 +785,9 @@ public class FileUtil {
 					fos.close();
 					zin.closeEntry();
 				}
+				
+				if (entry.getTime() >= 0)
+					entryFile.setLastModified(entry.getTime());
 			}
 			return true;
 		} catch (IOException e) {
@@ -974,10 +977,9 @@ public class FileUtil {
 	 * @param file
 	 * @return
 	 */
-	@SuppressWarnings("deprecation")
 	public static String getUrl(File file) {
 		try {
-			String url = file.getCanonicalFile().toURL().toString();
+			String url = file.getCanonicalFile().toURI().toASCIIString();
 			return url.replace("file:/", "file:///");
 		} catch(Exception e) {
 			



Mime
View raw message