20
20
*/
21
21
package org .exist .repo ;
22
22
23
- import java .io .*;
23
+ import java .io .BufferedReader ;
24
+ import java .io .IOException ;
24
25
import java .nio .file .Files ;
25
26
import java .nio .file .Path ;
26
27
import java .util .Collection ;
@@ -70,7 +71,7 @@ public static void updateClasspath(BrokerPool pool, org.expath.pkg.repo.Package
70
71
return ;
71
72
}
72
73
final FileSystemStorage .FileSystemResolver resolver = (FileSystemStorage .FileSystemResolver ) pkg .getResolver ();
73
- final File packageDir = resolver .resolveResourceAsFile ("." );
74
+ final Path packageDir = resolver .resolveResourceAsFile ("." );
74
75
final Classpath cp = new Classpath ();
75
76
try {
76
77
scanPackageDir (cp , packageDir );
@@ -92,7 +93,7 @@ private static void scanPackages(BrokerPool pool, Classpath classpath) {
92
93
} else {
93
94
try {
94
95
final FileSystemStorage .FileSystemResolver resolver = (FileSystemStorage .FileSystemResolver ) pkg .getResolver ();
95
- final File packageDir = resolver .resolveResourceAsFile ("." );
96
+ final Path packageDir = resolver .resolveResourceAsFile ("." );
96
97
scanPackageDir (classpath , packageDir );
97
98
} catch (final IOException e ) {
98
99
LOG .warn ("An error occurred while updating classpath for package " + pkg .getName (), e );
@@ -125,8 +126,8 @@ private static boolean isCompatible(Package pkg) throws PackageException {
125
126
return processorVersion .getDependencyVersion ().isCompatible (procVersion );
126
127
}
127
128
128
- private static void scanPackageDir (Classpath classpath , File module ) throws IOException {
129
- final Path dotExist = module .toPath (). resolve (".exist" );
129
+ private static void scanPackageDir (Classpath classpath , Path module ) throws IOException {
130
+ final Path dotExist = module .resolve (".exist" );
130
131
if (Files .exists (dotExist )) {
131
132
if (!Files .isDirectory (dotExist )) {
132
133
throw new IOException ("The .exist config dir is not a dir: " + dotExist );
0 commit comments