Skip to content

Commit 45d9a40

Browse files
committed
Updated tika-core to 3.1.0
1 parent 3ff0eaa commit 45d9a40

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dependencies {
8888
exclude group: "com.sun.xml.bind"
8989
}
9090
// apache
91-
implementation "org.apache.tika:tika-core:2.9.3"
91+
implementation "org.apache.tika:tika-core:3.1.0"
9292

9393
testImplementation platform('org.junit:junit-bom')
9494
testImplementation 'org.junit.jupiter:junit-jupiter'

src/main/java/edu/kit/datamanager/mappingservice/util/FileUtil.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,17 @@ public static Path cloneGitRepository(String repositoryUrl, String branch, Strin
311311
target.mkdirs();
312312

313313
LOGGER.info("Cloning branch '{}' of repository '{}' to '{}'", branch, repositoryUrl, target.getPath());
314+
Git g = null;
314315
try {
315-
try (Git res = Git.cloneRepository().setURI(repositoryUrl).setBranch(branch).setDirectory(target).call()) {
316-
res.getRepository().close();
317-
}
316+
g = Git.cloneRepository().setURI(repositoryUrl).setBranch(branch).setDirectory(target).call();
317+
LOGGER.trace("Repository successfully cloned to {}.", target);
318318
} catch (JGitInternalException | GitAPIException e) {
319319
LOGGER.error("Error cloning git repository '" + repositoryUrl + "' to '" + target + "'!", e);
320320
throw new MappingServiceException("Failed to prepare plugin. Plugin code destination not accessible.");
321+
} finally {
322+
if (g != null) {
323+
g.getRepository().close();
324+
}
321325
}
322326
}
323327
return target.toPath();

0 commit comments

Comments
 (0)