aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2023-12-18 16:26:38 +0100
committersonartech <sonartech@sonarsource.com>2024-01-04 20:02:48 +0000
commitdab9f39a5046d1dfe31e685509085f4079487d52 (patch)
tree978d1bf9708c2031eb0261f4b8ca94940025efff /sonar-core
parentf8465c0d33ceb835c92f0b24e7842ba96c7604e0 (diff)
downloadsonarqube-dab9f39a5046d1dfe31e685509085f4079487d52.tar.gz
sonarqube-dab9f39a5046d1dfe31e685509085f4079487d52.zip
SONAR-21195 Fix issues raised by SonarQube
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/classloader/ClassloaderBuilder.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/sonar-core/src/main/java/org/sonar/classloader/ClassloaderBuilder.java b/sonar-core/src/main/java/org/sonar/classloader/ClassloaderBuilder.java
index 076865924dd..5a843212fc9 100644
--- a/sonar-core/src/main/java/org/sonar/classloader/ClassloaderBuilder.java
+++ b/sonar-core/src/main/java/org/sonar/classloader/ClassloaderBuilder.java
@@ -117,13 +117,7 @@ public class ClassloaderBuilder {
throw new IllegalStateException(String.format("The classloader '%s' already exists in the list of previously created classloaders."
+ " Can not create it twice.", key));
}
- //TODO: to be checked, the other version of the code is not building
- ClassRealm realm = AccessController.doPrivileged(new PrivilegedAction<ClassRealm>() {
- @Override
- public ClassRealm run() {
- return new ClassRealm(key, baseClassloader);
- }
- });
+ ClassRealm realm = AccessController.doPrivileged((PrivilegedAction<ClassRealm>) () -> new ClassRealm(key, baseClassloader));
realm.setStrategy(LoadingOrder.PARENT_FIRST.strategy);
newRealmsByKey.put(key, new NewRealm(realm));
return this;