You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by vi...@apache.org on 2016/08/29 19:01:02 UTC
svn commit: r1758292 -
/tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java
Author: violetagg
Date: Mon Aug 29 19:01:02 2016
New Revision: 1758292
URL: http://svn.apache.org/viewvc?rev=1758292&view=rev
Log:
Fix the creation of the file in the test. The test was failing when there is a space in the path.
Modified:
tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java
Modified: tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java?rev=1758292&r1=1758291&r2=1758292&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java Mon Aug 29 19:01:02 2016
@@ -18,6 +18,7 @@ package org.apache.catalina.startup;
import java.beans.PropertyChangeListener;
import java.io.File;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
import java.util.HashSet;
@@ -364,12 +365,13 @@ public class TestContextConfigAnnotation
*
* @param className
* @return File Resource
+ * @throws URISyntaxException
*/
- private File paramClassResource(String className) {
+ private File paramClassResource(String className) throws URISyntaxException {
URL url = getClass().getClassLoader().getResource(className + ".class");
assertNotNull(url);
- File file = new File(url.getPath());
+ File file = new File(url.toURI());
return file;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org