You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2021/04/28 13:18:36 UTC
[uima-uimaj] branch
origin/bugfix/UIMA-6310-JCasClassLoaderTest-sometimes-fails-v2 created (now
4b787c4)
This is an automated email from the ASF dual-hosted git repository.
rec pushed a change to branch origin/bugfix/UIMA-6310-JCasClassLoaderTest-sometimes-fails-v2
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git.
at 4b787c4 [UIMA-6310] JCasClassLoaderTest sometimes fails
This branch includes the following new commits:
new 4b787c4 [UIMA-6310] JCasClassLoaderTest sometimes fails
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[uima-uimaj] 01/01: [UIMA-6310] JCasClassLoaderTest sometimes fails
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rec pushed a commit to branch origin/bugfix/UIMA-6310-JCasClassLoaderTest-sometimes-fails-v2
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git
commit 4b787c41625dd80bd5a33d88df00a7f43ec1d2cc
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Wed Apr 28 15:18:27 2021 +0200
[UIMA-6310] JCasClassLoaderTest sometimes fails
- Fixed unit test - was passing an URL in where a file path was required
---
.../test/java/org/apache/uima/cas/test/JCasClassLoaderTest.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/uimaj-core/src/test/java/org/apache/uima/cas/test/JCasClassLoaderTest.java b/uimaj-core/src/test/java/org/apache/uima/cas/test/JCasClassLoaderTest.java
index 9f54aec..0fac8dd 100644
--- a/uimaj-core/src/test/java/org/apache/uima/cas/test/JCasClassLoaderTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/cas/test/JCasClassLoaderTest.java
@@ -34,7 +34,6 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
-import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -147,10 +146,8 @@ public class JCasClassLoaderTest {
new File(cpPackageBase, "JCasClassLoaderTest$FetchTheTokenAnnotator.class"));
JCas jcas = makeJCas(clForCas);
- AnalysisEngine addATokenAnnotator = makeAnalysisEngine(AddATokenAnnotator.class,
- cpBase.toURI().toURL());
- AnalysisEngine fetchTheTokenAnnotator = makeAnalysisEngine(FetchTheTokenAnnotator.class,
- cpBase.toURI().toURL());
+ AnalysisEngine addATokenAnnotator = makeAnalysisEngine(AddATokenAnnotator.class, cpBase);
+ AnalysisEngine fetchTheTokenAnnotator = makeAnalysisEngine(FetchTheTokenAnnotator.class, cpBase);
jcas.setDocumentText("test");
@@ -540,7 +537,7 @@ public class JCasClassLoaderTest {
* so it using the given classpath to load its JCas wrappers.
*/
private AnalysisEngine makeAnalysisEngine(Class<? extends Annotator_ImplBase> aeClass,
- URL... classPath) throws ResourceInitializationException, MalformedURLException {
+ File... classPath) throws ResourceInitializationException, MalformedURLException {
String cp = Stream.of(classPath).map(Object::toString).collect(joining(File.pathSeparator));
ResourceManager resMgr = newDefaultResourceManager();
resMgr.setExtensionClassPath(cp, false);