Skip to content

Commit

Permalink
Fix compile warnings in mantis-server-agent module Netflix#393
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Wu authored and J. Wu committed Apr 4, 2023
1 parent f94a508 commit 0ccadcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions mantis-server/mantis-server-agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ dependencies {
implementation libraries.spotifyFutures
implementation libraries.slf4jApi
implementation libraries.slf4jLog4j12
implementation 'org.jetbrains:annotations:16.0.2'

testImplementation libraries.junit4
testImplementation libraries.mockitoAll
testImplementation project(":mantis-server:mantis-server-worker")
testImplementation(testFixtures(project(":mantis-control-plane:mantis-control-plane-core")))
testImplementation 'com.google.code.findbugs:jsr305:3.0.2'
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.File;
import java.io.IOException;
import java.net.URI;
import javax.annotation.Nullable;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import net.lingala.zip4j.ZipFile;
Expand All @@ -37,7 +38,7 @@ public interface BlobStore extends Closeable {
* @param prefixUri prefix that needs to be prepended to every requested resource.
* @return blob store with the prefix patterns baked in.
*/
default BlobStore withPrefix(URI prefixUri) {
default BlobStore withPrefix(final URI prefixUri) {
return new PrefixedBlobStore(prefixUri, this);
}

Expand All @@ -50,8 +51,8 @@ default BlobStore withZipCapabilities() {
return new ZipHandlingBlobStore(this);
}

static BlobStore forHadoopFileSystem(URI clusterStoragePath, File localStoreDir) throws Exception {
final org.apache.hadoop.fs.FileSystem fileSystem =
static BlobStore forHadoopFileSystem(URI clusterStoragePath, File localStoreDir) throws IOException {
org.apache.hadoop.fs.FileSystem fileSystem =
FileSystemInitializer.create(clusterStoragePath);

return
Expand Down Expand Up @@ -111,7 +112,7 @@ private String getUnzippedDestDir(ZipFile zipFile) {
return zipFile.getFile().getPath() + "-unzipped";
}

private ZipFile getZipFile(File file) {
private static @Nullable ZipFile getZipFile(File file) {
ZipFile file1 = new ZipFile(file);
if (file1.isValidZipFile()) {
return file1;
Expand Down

0 comments on commit 0ccadcc

Please sign in to comment.