From b7df8da592cbbd68d6f227b55b7e9c1157ed24a2 Mon Sep 17 00:00:00 2001 From: dsyer Date: Wed, 9 Dec 2009 13:09:38 +0000 Subject: [PATCH] Suppress warnings about unused stuff that is used reflectively --- .../batch/item/database/IbatisBatchItemWriterTests.java | 1 + .../database/JdbcBatchItemWriterNamedParameterTests.java | 1 + .../batch/item/validator/SpringValidatorTests.java | 1 + .../batch/repeat/support/ResultHolderResultQueueTests.java | 5 ----- .../batch/support/AnnotationMethodResolverTests.java | 3 +++ .../batch/support/DefaultPropertEditorRegistrarTests.java | 1 + .../batch/support/SimpleMethodInvokerTests.java | 1 + 7 files changed, 8 insertions(+), 5 deletions(-) diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/IbatisBatchItemWriterTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/IbatisBatchItemWriterTests.java index df6205a35..20f16ff31 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/IbatisBatchItemWriterTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/IbatisBatchItemWriterTests.java @@ -47,6 +47,7 @@ public class IbatisBatchItemWriterTests { private String statementId = "updateFoo"; + @SuppressWarnings("unused") private class Foo { private Long id; private String bar; diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/JdbcBatchItemWriterNamedParameterTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/JdbcBatchItemWriterNamedParameterTests.java index f96a7f675..c43430b34 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/JdbcBatchItemWriterNamedParameterTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/JdbcBatchItemWriterNamedParameterTests.java @@ -40,6 +40,7 @@ public class JdbcBatchItemWriterNamedParameterTests { private String sql = "update foo set bar = :bar where id = :id"; + @SuppressWarnings("unused") private class Foo { private Long id; private String bar; diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/validator/SpringValidatorTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/validator/SpringValidatorTests.java index cc08fb105..b67218398 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/validator/SpringValidatorTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/validator/SpringValidatorTests.java @@ -119,6 +119,7 @@ public class SpringValidatorTests { } } + @SuppressWarnings("unused") private static class TestBean { private String foo; diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ResultHolderResultQueueTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ResultHolderResultQueueTests.java index bcca9d90a..f2f17710d 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ResultHolderResultQueueTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ResultHolderResultQueueTests.java @@ -45,11 +45,6 @@ public class ResultHolderResultQueueTests { this.result = result; } - public TestResultHolder(Throwable error) { - super(); - this.error = error; - } - public RepeatContext getContext() { return null; } diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/AnnotationMethodResolverTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/AnnotationMethodResolverTests.java index e6e2ebdaf..2bbeab744 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/AnnotationMethodResolverTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/AnnotationMethodResolverTests.java @@ -60,6 +60,7 @@ public class AnnotationMethodResolverTests { } + @SuppressWarnings("unused") private static class SingleAnnotationTestBean { @TestAnnotation @@ -73,6 +74,7 @@ public class AnnotationMethodResolverTests { } + @SuppressWarnings("unused") private static class MultipleAnnotationTestBean { @TestAnnotation @@ -87,6 +89,7 @@ public class AnnotationMethodResolverTests { } + @SuppressWarnings("unused") private static class NoAnnotationTestBean { public String upperCase(String s) { diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DefaultPropertEditorRegistrarTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DefaultPropertEditorRegistrarTests.java index 5a29f3872..299ec8050 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DefaultPropertEditorRegistrarTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DefaultPropertEditorRegistrarTests.java @@ -70,6 +70,7 @@ public class DefaultPropertEditorRegistrarTests { mapper.setCustomEditors(Collections.singletonMap(new Object(), new CustomNumberEditor(Long.class, true))); } + @SuppressWarnings("unused") private static class BeanWithIntArray { private int[] numbers; diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/SimpleMethodInvokerTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/SimpleMethodInvokerTests.java index bd059b637..39ed0d124 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/SimpleMethodInvokerTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/SimpleMethodInvokerTests.java @@ -118,6 +118,7 @@ public class SimpleMethodInvokerTests { assertEquals(methodInvoker, methodInvoker2); } + @SuppressWarnings("unused") private class TestClass{ boolean beforeCalled = false;