diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-02-23 22:32:31 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-02-23 23:14:33 +0100 |
commit | 2bc4e191083b996abf80bcbc535064bce6881bed (patch) | |
tree | 4a02095468a96e08ff6fa1bba3ff8a869a223546 /sonar-core/src | |
parent | 0654ad1cdeb80e447b050bc0b8d67724d1d2531c (diff) | |
download | sonarqube-2bc4e191083b996abf80bcbc535064bce6881bed.tar.gz sonarqube-2bc4e191083b996abf80bcbc535064bce6881bed.zip |
Fix quality flaws
Diffstat (limited to 'sonar-core/src')
3 files changed, 3 insertions, 3 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/profiling/ProfiledDataSource.java b/sonar-core/src/main/java/org/sonar/core/persistence/profiling/ProfiledDataSource.java index 5fbc4d49dab..0a48c71c5b2 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/profiling/ProfiledDataSource.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/profiling/ProfiledDataSource.java @@ -31,7 +31,7 @@ import java.util.Collection; public class ProfiledDataSource extends BasicDataSource { - public static final Logger SQL_LOGGER = Loggers.get("sql"); + static final Logger SQL_LOGGER = Loggers.get("sql"); private final BasicDataSource delegate; diff --git a/sonar-core/src/main/java/org/sonar/core/util/NonNullInputFunction.java b/sonar-core/src/main/java/org/sonar/core/util/NonNullInputFunction.java index bf312d68d25..a99652beb58 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/NonNullInputFunction.java +++ b/sonar-core/src/main/java/org/sonar/core/util/NonNullInputFunction.java @@ -32,7 +32,7 @@ public abstract class NonNullInputFunction<F,T> implements Function<F, T> { @Override public final T apply(@Nullable F input) { - Preconditions.checkNotNull(input, "Null inputs are not allowed in this function"); + Preconditions.checkArgument(input != null, "Null inputs are not allowed in this function"); return doApply(input); } diff --git a/sonar-core/src/test/java/org/sonar/core/util/NonNullInputFunctionTest.java b/sonar-core/src/test/java/org/sonar/core/util/NonNullInputFunctionTest.java index f7417d0ce48..45f4ae03548 100644 --- a/sonar-core/src/test/java/org/sonar/core/util/NonNullInputFunctionTest.java +++ b/sonar-core/src/test/java/org/sonar/core/util/NonNullInputFunctionTest.java @@ -33,7 +33,7 @@ public class NonNullInputFunctionTest { try { sut.apply(null); fail(); - } catch (NullPointerException e) { + } catch (IllegalArgumentException e) { assertThat(e).hasMessage("Null inputs are not allowed in this function"); } } |