Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
Ignore two findbugs violations
Browse files Browse the repository at this point in the history
  • Loading branch information
davidxia committed Sep 12, 2019
1 parent bbe5ce2 commit 0ab7e3c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ matrix:
- ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"
- jdk: openjdk10
before_install:
- rm "${JAVA_HOME}/lib/security/cacerts"
- ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"
- sudo rm "${JAVA_HOME}/lib/security/cacerts"
- sudo ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"
- jdk: openjdk11

env:
Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,18 @@
<version>1.7.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/spotify/docker/BuildMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigValue;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -778,6 +779,7 @@ private String normalizeDest(final String filePath) {
return dest;
}

@SuppressFBWarnings("NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE")
private List<String> copyResources(String destination) throws IOException {

final List<String> allCopiedPaths = newArrayList();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/spotify/docker/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.spotify.docker.client.exceptions.DockerException;
import com.spotify.docker.client.ProgressHandler;
import com.spotify.docker.client.messages.ProgressMessage;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;

Expand Down Expand Up @@ -162,6 +163,7 @@ public static void saveImage(DockerClient docker, String imageName,
java.nio.file.Files.copy(is, tarArchivePath, StandardCopyOption.REPLACE_EXISTING);
}

@SuppressFBWarnings("NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE")
public static void writeImageInfoFile(final DockerBuildInformation buildInfo,
final String tagInfoFile) throws IOException {
final Path imageInfoPath = Paths.get(tagInfoFile);
Expand Down

0 comments on commit 0ab7e3c

Please sign in to comment.