提交 0ccc076b 编写于 作者: C Christoph Kutzinski

fixed some compiler warnings

上级 42030604
...@@ -41,6 +41,7 @@ public class BulkChangeTest extends TestCase { ...@@ -41,6 +41,7 @@ public class BulkChangeTest extends TestCase {
*/ */
int saveCount = 0; int saveCount = 0;
@SuppressWarnings("unused")
int x,y; int x,y;
public void setX(int x) throws IOException { public void setX(int x) throws IOException {
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*/ */
package hudson; package hudson;
import hudson.remoting.Future;
import hudson.remoting.VirtualChannel; import hudson.remoting.VirtualChannel;
import hudson.util.IOException2; import hudson.util.IOException2;
import hudson.util.NullStream; import hudson.util.NullStream;
...@@ -102,7 +101,7 @@ public class FilePathTest extends ChannelTestCase { ...@@ -102,7 +101,7 @@ public class FilePathTest extends ChannelTestCase {
ExecutorService es = Executors.newFixedThreadPool(100); ExecutorService es = Executors.newFixedThreadPool(100);
try { try {
List<java.util.concurrent.Future> r = new ArrayList<java.util.concurrent.Future>(); List<java.util.concurrent.Future<Object>> r = new ArrayList<java.util.concurrent.Future<Object>>();
for (int i=0; i<100; i++) { for (int i=0; i<100; i++) {
r.add(es.submit(new Callable<Object>() { r.add(es.submit(new Callable<Object>() {
public Object call() throws Exception { public Object call() throws Exception {
...@@ -150,7 +149,7 @@ public class FilePathTest extends ChannelTestCase { ...@@ -150,7 +149,7 @@ public class FilePathTest extends ChannelTestCase {
})); }));
} }
for (java.util.concurrent.Future f : r) for (java.util.concurrent.Future<Object> f : r)
f.get(); f.get();
} finally { } finally {
es.shutdown(); es.shutdown();
...@@ -166,7 +165,7 @@ public class FilePathTest extends ChannelTestCase { ...@@ -166,7 +165,7 @@ public class FilePathTest extends ChannelTestCase {
try { try {
assertTrue(src.mkdir()); assertTrue(src.mkdir());
assertTrue(dst.mkdir()); assertTrue(dst.mkdir());
File f = File.createTempFile("foo", ".tmp", src); File.createTempFile("foo", ".tmp", src);
FilePath fp = new FilePath(src); FilePath fp = new FilePath(src);
assertEquals(1, fp.copyRecursiveTo(new FilePath(dst))); assertEquals(1, fp.copyRecursiveTo(new FilePath(dst)));
// copy again should still report 1 // copy again should still report 1
......
...@@ -70,8 +70,8 @@ public class LauncherTest extends ChannelTestCase { ...@@ -70,8 +70,8 @@ public class LauncherTest extends ChannelTestCase {
} }
} }
private static final Callable<Object,RuntimeException> NOOP = new Callable() { private static final Callable<Object,RuntimeException> NOOP = new Callable<Object,RuntimeException>() {
public Object call() throws Exception { public Object call() throws RuntimeException {
return null; return null;
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册