From: Evgeny Mandrikov Date: Wed, 26 Oct 2011 21:59:07 +0000 (+0400) Subject: Revert "SONAR-2594 FindBugs plugin should support localized violations" X-Git-Tag: 2.12~98 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5570820af81ea3549c9e95c56534f39c8afa123c;p=sonarqube.git Revert "SONAR-2594 FindBugs plugin should support localized violations" This reverts commit 84d96bf6ada999fe22db0551b3e9d56f6605c9bd. --- diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java index 9526f7975c2..21057ea4663 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java @@ -35,7 +35,6 @@ import org.sonar.plugins.findbugs.xml.Match; import java.io.*; import java.util.ArrayList; import java.util.List; -import java.util.Locale; /** * @since 2.4 @@ -122,10 +121,6 @@ public class FindbugsConfiguration implements BatchExtension { return project.getConfiguration().getLong(CoreProperties.FINDBUGS_TIMEOUT_PROPERTY, CoreProperties.FINDBUGS_TIMEOUT_DEFAULT_VALUE); } - public Locale getLocale() { - return new Locale(project.getConfiguration().getString(CoreProperties.CORE_VIOLATION_LOCALE_PROPERTY, CoreProperties.CORE_VIOLATION_LOCALE_DEFAULT_VALUE)); - } - private File jsr305Lib; private File annotationsLib; diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java index cd0d1fb175a..6beceb7badc 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java @@ -41,7 +41,6 @@ import java.lang.reflect.Field; import java.net.URL; import java.util.Enumeration; import java.util.List; -import java.util.Locale; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -65,10 +64,6 @@ public class FindbugsExecutor implements BatchExtension { ClassLoader initialClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(FindBugs2.class.getClassLoader()); - // This is a dirty workaround, but unfortunately there is no other way to specify locale for FindBugs - see SONAR-2594 - Locale initialLocale = Locale.getDefault(); - Locale.setDefault(configuration.getLocale()); - OutputStream xmlOutput = null; ExecutorService executorService = Executors.newSingleThreadExecutor(); try { @@ -127,7 +122,6 @@ public class FindbugsExecutor implements BatchExtension { executorService.shutdown(); IOUtils.closeQuietly(xmlOutput); Thread.currentThread().setContextClassLoader(initialClassLoader); - Locale.setDefault(initialLocale); } }