From 61a09da5ff535e6ecbbbaaae766a9c36c859106f Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Tue, 24 Mar 2015 10:02:15 -0700 Subject: [PATCH] Fix Eclipse warnings in com.facebook.buck.maven package. Summary: Normally, these would be caught by Ant, but `com.facebook.buck.maven` is excluded from Ant compilation for the time being. Test Plan: Yellow warning icons disappear in Eclipse. --- src/com/facebook/buck/maven/Resolver.java | 5 +++++ test/com/facebook/buck/maven/ResolverIntegrationTest.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/facebook/buck/maven/Resolver.java b/src/com/facebook/buck/maven/Resolver.java index 61d6c55e0ff..2b7d166fc2b 100644 --- a/src/com/facebook/buck/maven/Resolver.java +++ b/src/com/facebook/buck/maven/Resolver.java @@ -392,10 +392,12 @@ public Prebuilt(String name, Path binaryJar) { this.binaryJar = binaryJar; } + @SuppressWarnings("unused") // This method is read reflectively. public String getName() { return name; } + @SuppressWarnings("unused") // This method is read reflectively. public Path getBinaryJar() { return binaryJar; } @@ -404,6 +406,7 @@ public void setSourceJar(Path sourceJar) { this.sourceJar = sourceJar; } + @SuppressWarnings("unused") // This method is read reflectively. public Path getSourceJar() { return sourceJar; } @@ -412,6 +415,7 @@ public void addDep(String dep) { this.deps.add(dep); } + @SuppressWarnings("unused") // This method is read reflectively. public SortedSet getDeps() { return deps; } @@ -420,6 +424,7 @@ public void addVisibility(String dep) { this.visibilities.add(dep); } + @SuppressWarnings("unused") // This method is read reflectively. public SortedSet getVisibility() { return visibilities; } diff --git a/test/com/facebook/buck/maven/ResolverIntegrationTest.java b/test/com/facebook/buck/maven/ResolverIntegrationTest.java index 1c1636a3274..a8c31d3d0bc 100644 --- a/test/com/facebook/buck/maven/ResolverIntegrationTest.java +++ b/test/com/facebook/buck/maven/ResolverIntegrationTest.java @@ -249,6 +249,6 @@ public void shouldOmitTargetsInTheSameBuildFileInVisibilityArguments() throws Ex // Although the "deps-in-same-project" could be in the visibility param, it doesn't need to be // because it's declared in the same build file. - assertEquals(0, ((Collection) noDeps.get("visibility")).size()); + assertEquals(0, ((Collection) noDeps.get("visibility")).size()); } }