aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-04-21 12:34:53 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-04-21 12:35:21 +0200
commitad0278f3933bb806cbedf91b20e852562e663a1d (patch)
tree08d586a2b6cfc5506ba10d6c66766530fbca6c2a /sonar-core
parentb03513b58f4858a9932f442b0ed55f4cdcd34b42 (diff)
downloadsonarqube-ad0278f3933bb806cbedf91b20e852562e663a1d.tar.gz
sonarqube-ad0278f3933bb806cbedf91b20e852562e663a1d.zip
having a go at quality issues on singleton enum Predicates
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/plugins/PluginJarInstaller.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/plugins/PluginJarInstaller.java b/sonar-core/src/main/java/org/sonar/core/plugins/PluginJarInstaller.java
index ff90f7f1274..5af5f9c754f 100644
--- a/sonar-core/src/main/java/org/sonar/core/plugins/PluginJarInstaller.java
+++ b/sonar-core/src/main/java/org/sonar/core/plugins/PluginJarInstaller.java
@@ -25,13 +25,12 @@ import org.sonar.api.ServerComponent;
import org.sonar.api.utils.SonarException;
import org.sonar.updatecenter.common.PluginManifest;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
-import static com.google.common.base.Preconditions.checkNotNull;
-
public abstract class PluginJarInstaller implements BatchComponent, ServerComponent {
protected static final String FAIL_TO_INSTALL_PLUGIN = "Fail to install plugin: ";
@@ -95,14 +94,14 @@ public abstract class PluginJarInstaller implements BatchComponent, ServerCompon
private final Function<File, DefaultPluginMetadata> jarFileToCorePlugin = new Function<File, DefaultPluginMetadata>() {
@Override
- public DefaultPluginMetadata apply(@Nullable File file) {
- return extractMetadata(checkNotNull(file), true);
+ public DefaultPluginMetadata apply(@Nonnull File file) {
+ return extractMetadata(file, true);
}
};
private final Function<File, DefaultPluginMetadata> jarFileToPlugin = new Function<File, DefaultPluginMetadata>() {
@Override
- public DefaultPluginMetadata apply(@Nullable File file) {
- return extractMetadata(checkNotNull(file), false);
+ public DefaultPluginMetadata apply(@Nonnull File file) {
+ return extractMetadata(file, false);
}
};
}