Skip to content

Commit 1499ef9

Browse files
[test] Fix "the type Module is ambiguous" test errors.
1 parent 836496b commit 1499ef9

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

exist-core/src/main/java/org/exist/repo/ExistRepository.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,18 @@
2929
import org.exist.storage.NativeBroker;
3030
import org.exist.util.Configuration;
3131
import org.exist.util.FileUtils;
32-
import org.exist.xquery.*;
33-
import org.expath.pkg.repo.*;
34-
import org.expath.pkg.repo.Package;
32+
import org.exist.xquery.ErrorCodes;
33+
import org.exist.xquery.Expression;
34+
import org.exist.xquery.Module;
35+
import org.exist.xquery.XPathException;
36+
import org.exist.xquery.XQueryContext;
37+
import org.expath.pkg.repo.FileSystemStorage;
3538
import org.expath.pkg.repo.FileSystemStorage.FileSystemResolver;
39+
import org.expath.pkg.repo.Package;
40+
import org.expath.pkg.repo.Packages;
41+
import org.expath.pkg.repo.PackageException;
42+
import org.expath.pkg.repo.Repository;
43+
import org.expath.pkg.repo.URISpace;
3644

3745
import javax.xml.transform.Source;
3846
import javax.xml.transform.stream.StreamSource;
@@ -44,7 +52,12 @@
4452
import java.nio.file.Path;
4553
import java.nio.file.Paths;
4654
import java.nio.file.StandardCopyOption;
47-
import java.util.*;
55+
import java.util.ArrayList;
56+
import java.util.Collections;
57+
import java.util.List;
58+
import java.util.Map;
59+
import java.util.Observable;
60+
import java.util.Optional;
4861

4962
/**
5063
* A repository as viewed by eXist.
@@ -116,7 +129,7 @@ public Module resolveJavaModule(final String namespace, final XQueryContext ctxt
116129
uri = new URI(namespace);
117130
}
118131
catch (final URISyntaxException ex) {
119-
throw new XPathException((Expression) null, ErrorCodes.XQST0046, "Invalid URI: " + namespace, ex);
132+
throw new XPathException(null, ErrorCodes.XQST0046, "Invalid URI: " + namespace, ex);
120133
}
121134
for (final Packages pp : myParent.listPackages()) {
122135
final Package pkg = pp.latest();
@@ -202,7 +215,7 @@ public Path resolveXQueryModule(final String namespace) throws XPathException {
202215
try {
203216
uri = new URI(namespace);
204217
} catch (final URISyntaxException ex) {
205-
throw new XPathException((Expression) null, ErrorCodes.XQST0046, "Invalid URI: " + namespace, ex);
218+
throw new XPathException(null, ErrorCodes.XQST0046, "Invalid URI: " + namespace, ex);
206219
}
207220
for (final Packages pp : myParent.listPackages()) {
208221
final Package pkg = pp.latest();
@@ -224,9 +237,9 @@ public Path resolveXQueryModule(final String namespace) throws XPathException {
224237
return Paths.get(new URI(sysid));
225238
}
226239
} catch (final URISyntaxException ex) {
227-
throw new XPathException((Expression) null, ErrorCodes.XQST0046, "Error parsing the URI of the query library: " + sysid, ex);
240+
throw new XPathException(null, ErrorCodes.XQST0046, "Error parsing the URI of the query library: " + sysid, ex);
228241
} catch (final PackageException ex) {
229-
throw new XPathException((Expression) null, ErrorCodes.XQST0059, "Error resolving the query library: " + namespace, ex);
242+
throw new XPathException(null, ErrorCodes.XQST0059, "Error resolving the query library: " + namespace, ex);
230243
} finally {
231244
if (src != null && src instanceof StreamSource) {
232245
final StreamSource streamSource = ((StreamSource)src);

0 commit comments

Comments
 (0)