]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "SONAR-2594 FindBugs plugin should support localized violations"
authorEvgeny Mandrikov <mandrikov@gmail.com>
Wed, 26 Oct 2011 21:59:07 +0000 (01:59 +0400)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Wed, 26 Oct 2011 22:01:47 +0000 (02:01 +0400)
This reverts commit 84d96bf6ada999fe22db0551b3e9d56f6605c9bd.

plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java

index 9526f7975c20513b7d1c16dd0494f57efde9b37b..21057ea46631c3a1f87e96072b6a299914baad1c 100644 (file)
@@ -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;
 
index cd0d1fb175a9804741e314a14d05731c48d7d10e..6beceb7badcc0e24104a8da4adc7238e787320f3 100644 (file)
@@ -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);
     }
   }