]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 1 Jul 2014 21:22:14 +0000 (23:22 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 1 Jul 2014 21:22:14 +0000 (23:22 +0200)
sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/LanguageDetection.java
sonar-core/src/main/java/org/sonar/core/plugins/PluginClassloaders.java

index fbfedb537b5dba5cc279e9760ade843c6d354eb4..1ee5379f579d72a4d03b2ef4096884ccb8806a81 100644 (file)
@@ -66,7 +66,7 @@ class LanguageDetection {
         for (int i = 0; i < patterns.length; i++) {
           String suffix = patterns[i];
           String extension = sanitizeExtension(suffix);
-          patterns[i] = "**/*." + extension;
+          patterns[i] = new StringBuilder().append("**/*.").append(extension).toString();
         }
         PathPattern[] defaultLanguagePatterns = PathPattern.create(patterns);
         patternsByLanguage.put(language.key(), defaultLanguagePatterns);
index d00f8242c9509720ffaf5113827304957cb5c7f0..3565ee5639d0f9b3fb6a726577fbe345c85465f6 100644 (file)
@@ -180,7 +180,7 @@ public class PluginClassloaders {
         String[] packagesToExport = new String[PREFIXES_TO_EXPORT.length];
         for (int i = 0; i < PREFIXES_TO_EXPORT.length; i++) {
           // important to have dot at the end of package name only for classworlds 1.1
-          packagesToExport[i] = PREFIXES_TO_EXPORT[i] + realm.getId() + ".api";
+          packagesToExport[i] = String.format("%s%s.api", PREFIXES_TO_EXPORT[i], realm.getId());
         }
         export(realm, packagesToExport);
       }