ALF-3536: An ancient parked customer issue. Make most unit tests work when there is a space in the classpath.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43767 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-11-21 10:35:24 +00:00
parent 6ffe457f8f
commit 366aa0f57f

View File

@@ -24,7 +24,6 @@ import java.io.IOException;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.net.URL; import java.net.URL;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
@@ -45,6 +44,7 @@ import org.alfresco.util.TempFileProvider;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.util.ResourceUtils;
/** /**
* Provides a base set of tests for testing * Provides a base set of tests for testing
@@ -129,12 +129,7 @@ public abstract class AbstractContentTransformerTest extends TestCase
{ {
return null; return null;
} }
File file = new File(url.getFile()); return ResourceUtils.getFile(url);
if (!file.exists())
{
return null;
}
return file;
} }
/** /**
* Helper method to load one of the "The quick brown fox" files from the * Helper method to load one of the "The quick brown fox" files from the