Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
Merge 61cb020 into 3c6faaf
Browse files Browse the repository at this point in the history
  • Loading branch information
marcust committed Sep 26, 2018
2 parents 3c6faaf + 61cb020 commit 4d51e46
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,7 +2,7 @@ sudo: required

language: java

jdk: oraclejdk10
jdk: openjdk11

addons:
sonarcloud:
Expand Down
Expand Up @@ -28,6 +28,7 @@

import javax.inject.Inject;
import javax.inject.Provider;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
Expand Down Expand Up @@ -142,7 +143,8 @@ private String defaultConfiguration(Method method) {
return annotation.value();
}

@SuppressFBWarnings(value = "OBL_UNSATISFIED_OBLIGATION", justification = "Wrong positive on unclosed stream")
@SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION", "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"},
justification = "Wrong positive on unclosed stream and Spotbugs Issue #756")
@SneakyThrows
private String propertyConfiguration(String configurationBaseNameLower, String propertyName) {
try (InputStream specificStream = this.getClass().getResourceAsStream("/" + configurationBaseNameLower + ".properties")) {
Expand All @@ -154,6 +156,13 @@ private String propertyConfiguration(String configurationBaseNameLower, String p
}
}

return globalPropertyConfiguration(propertyName);
}

@SuppressFBWarnings(value = {"NP_LOAD_OF_KNOWN_NULL_VALUE", "OBL_UNSATISFIED_OBLIGATION",
"RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", "RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"},
justification = "Wrong positive on unclosed stream and Spotbugs Issue #756")
private String globalPropertyConfiguration(String propertyName) throws IOException {
try (InputStream globalStream = this.getClass().getResourceAsStream("/jzenith.properties")) {
if (globalStream != null) {
return loadPropertyFrom(globalStream, propertyName);
Expand Down
25 changes: 24 additions & 1 deletion pom.xml
Expand Up @@ -31,7 +31,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<java.version>10</java.version>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

Expand All @@ -41,6 +41,7 @@
<mockito.version>2.22.0</mockito.version>
<groovy.version>2.4.12</groovy.version>
<testcontainers.version>1.9.0</testcontainers.version>
<pmd.version>6.7.0</pmd.version>

<jacoco.dataFile>${project.build.directory}/jacoco-it.exec</jacoco.dataFile>
</properties>
Expand Down Expand Up @@ -173,6 +174,28 @@
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-javascript</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-jsp</artifactId>
<version>${pmd.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
Expand Down

0 comments on commit 4d51e46

Please sign in to comment.