diff options
author | Eric Giffon <eric.giffon@sonarsource.com> | 2024-06-19 14:11:00 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-06-20 20:02:37 +0000 |
commit | 821580db867a0e08c4660c61db585a5d38caaff4 (patch) | |
tree | b8908d6f1153266d628b8ece501639dc03816ea4 | |
parent | f12ffe82e949d9934f6b29c8f2bb58471fa1aa52 (diff) | |
download | sonarqube-821580db867a0e08c4660c61db585a5d38caaff4.tar.gz sonarqube-821580db867a0e08c4660c61db585a5d38caaff4.zip |
SONAR-22152 Remove JGit workaround
No longer needed as the update to JGit 6.10 fixes the issue.
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java index 2a105bc466a..19b90c180fa 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java @@ -25,8 +25,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Nullable; -import org.eclipse.jgit.internal.util.ShutdownHook; -import org.slf4j.LoggerFactory; import org.sonar.api.utils.MessageException; import org.sonar.scanner.bootstrap.EnvironmentConfig; import org.sonar.scanner.bootstrap.SpringGlobalContainer; @@ -75,16 +73,6 @@ public final class Batch { SpringGlobalContainer.create(scannerProperties, components).execute(); } catch (RuntimeException e) { throw handleException(e); - } finally { - // Workaround for SONAR-22152 - // Call the cleanup method ourselves to avoid ClassNotFound errors when the Shutdown hook is called after the classloader is closed - try { - var cleanupMethod = ShutdownHook.class.getDeclaredMethod("cleanup"); - cleanupMethod.setAccessible(true); - cleanupMethod.invoke(ShutdownHook.INSTANCE); - } catch (Exception e) { - LoggerFactory.getLogger(Batch.class).debug("Failed to call JGit cleanup method", e); - } } return this; } |