diff --git a/odm/src/test/java/org/springframework/ldap/odm/test/ConverterFactoryTests.java b/odm/src/test/java/org/springframework/ldap/odm/test/ConverterFactoryTests.java index 53876896..e4cff176 100755 --- a/odm/src/test/java/org/springframework/ldap/odm/test/ConverterFactoryTests.java +++ b/odm/src/test/java/org/springframework/ldap/odm/test/ConverterFactoryTests.java @@ -74,13 +74,14 @@ public class ConverterFactoryTests { private static class NullConverter implements Converter { + @Override public T convert(Object source, Class toClass) throws Exception { return null; } } - private static class ConverterConfigTestData { + private static final class ConverterConfigTestData { private Class[] fromClasses; @@ -96,7 +97,7 @@ public class ConverterFactoryTests { } - private static class ConverterTestData { + private static final class ConverterTestData { private final Class fromClass; diff --git a/odm/src/test/java/org/springframework/ldap/odm/test/ConverterManagerTests.java b/odm/src/test/java/org/springframework/ldap/odm/test/ConverterManagerTests.java index 494910b6..35356a37 100755 --- a/odm/src/test/java/org/springframework/ldap/odm/test/ConverterManagerTests.java +++ b/odm/src/test/java/org/springframework/ldap/odm/test/ConverterManagerTests.java @@ -152,7 +152,7 @@ public final class ConverterManagerTests { this.converterManager.convert(String.class, "not a uri", URI.class); } - private static class ConverterTestData { + private static final class ConverterTestData { public final Class destClass; @@ -162,11 +162,11 @@ public final class ConverterManagerTests { public final String syntax; - public ConverterTestData(Object sourceData, Class destClass, T expectedValue) { + ConverterTestData(Object sourceData, Class destClass, T expectedValue) { this(sourceData, "", destClass, expectedValue); } - public ConverterTestData(Object sourceData, String syntax, Class destClass, T expectedValue) { + ConverterTestData(Object sourceData, String syntax, Class destClass, T expectedValue) { this.destClass = destClass; this.sourceData = sourceData; this.expectedValue = expectedValue; @@ -183,6 +183,7 @@ public final class ConverterManagerTests { private static class SquaredConverter implements Converter { + @Override public T convert(Object source, Class toClass) throws Exception { Integer intSource = null; @@ -207,6 +208,7 @@ public final class ConverterManagerTests { private static class CubedConverter implements Converter { + @Override public T convert(Object source, Class toClass) throws Exception { Integer intSource = null; diff --git a/odm/src/test/java/org/springframework/ldap/odm/test/LdapTests.java b/odm/src/test/java/org/springframework/ldap/odm/test/LdapTests.java index cc2c6c7b..6669fd54 100755 --- a/odm/src/test/java/org/springframework/ldap/odm/test/LdapTests.java +++ b/odm/src/test/java/org/springframework/ldap/odm/test/LdapTests.java @@ -212,7 +212,7 @@ public final class LdapTests { private int index; - private PersonName(int index) { + PersonName(int index) { this.index = index; } @@ -287,7 +287,7 @@ public final class LdapTests { private int index; - private OrganizationalName(int index) { + OrganizationalName(int index) { this.index = index; } @@ -522,7 +522,7 @@ public final class LdapTests { private String longName; - private Flag(String shortName, String longName) { + Flag(String shortName, String longName) { this.shortName = shortName; this.longName = longName; } @@ -627,7 +627,7 @@ public final class LdapTests { private Person[] people; - public SearchTestData(String search, SearchControls searchScope, Person[] people) { + SearchTestData(String search, SearchControls searchScope, Person[] people) { this.search = search; this.searchScope = searchScope; this.people = people; @@ -635,7 +635,7 @@ public final class LdapTests { } - private final static class NoEntry { + private static final class NoEntry { @SuppressWarnings("unused") @Id @@ -644,12 +644,12 @@ public final class LdapTests { } @Entry(objectClasses = "test") - private final static class NoId { + private static final class NoId { } @Entry(objectClasses = "test") - private final static class TwoIds { + private static final class TwoIds { @SuppressWarnings("unused") @Id @@ -660,13 +660,13 @@ public final class LdapTests { private Name secondId; @SuppressWarnings("unused") - public TwoIds() { + TwoIds() { } } @Entry(objectClasses = "test") - public final static class NoConstructor { + public static final class NoConstructor { @SuppressWarnings("unused") @Id @@ -678,7 +678,7 @@ public final class LdapTests { } @Entry(objectClasses = "test") - public final static class AttributeOnId { + public static final class AttributeOnId { @SuppressWarnings("unused") @Id @@ -688,7 +688,7 @@ public final class LdapTests { } @Entry(objectClasses = "test") - public final static class IdIsNotAName { + public static final class IdIsNotAName { @SuppressWarnings("unused") @Id @@ -697,7 +697,7 @@ public final class LdapTests { } @Entry(objectClasses = "test") - public final static class MissingConverter { + public static final class MissingConverter { @SuppressWarnings("unused") @Id @@ -709,7 +709,7 @@ public final class LdapTests { } @Entry(objectClasses = "test") - public final static class WrongClassForOc { + public static final class WrongClassForOc { @SuppressWarnings("unused") @Id diff --git a/odm/src/test/java/org/springframework/ldap/odm/test/SchemaViewerTests.java b/odm/src/test/java/org/springframework/ldap/odm/test/SchemaViewerTests.java index f7a3d0a8..6fd282ca 100755 --- a/odm/src/test/java/org/springframework/ldap/odm/test/SchemaViewerTests.java +++ b/odm/src/test/java/org/springframework/ldap/odm/test/SchemaViewerTests.java @@ -130,7 +130,7 @@ public final class SchemaViewerTests { private final String result; - public TestData(String flag, String value, String result) { + TestData(String flag, String value, String result) { this.flag = flag; this.value = value; this.result = result; diff --git a/odm/src/test/java/org/springframework/ldap/odm/test/utils/CompilerInterface.java b/odm/src/test/java/org/springframework/ldap/odm/test/utils/CompilerInterface.java index 37602039..49dadd28 100755 --- a/odm/src/test/java/org/springframework/ldap/odm/test/utils/CompilerInterface.java +++ b/odm/src/test/java/org/springframework/ldap/odm/test/utils/CompilerInterface.java @@ -24,7 +24,7 @@ import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.ToolProvider; -public class CompilerInterface { +public final class CompilerInterface { // Compile the given file - when we can drop Java 5 we'll use the Java 6 compiler API public static void compile(String directory, String file) throws Exception { @@ -39,4 +39,8 @@ public class CompilerInterface { fileManager.close(); } + private CompilerInterface() { + + } + } diff --git a/odm/src/test/java/org/springframework/ldap/odm/test/utils/GetFreePort.java b/odm/src/test/java/org/springframework/ldap/odm/test/utils/GetFreePort.java index 3dcfb19b..0eb73269 100755 --- a/odm/src/test/java/org/springframework/ldap/odm/test/utils/GetFreePort.java +++ b/odm/src/test/java/org/springframework/ldap/odm/test/utils/GetFreePort.java @@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory; // Added because the close down of the embedded Apache DS used // for unit testing does not seem to free up its port. -public class GetFreePort { +public final class GetFreePort { private static Logger LOG = LoggerFactory.getLogger(GetFreePort.class); @@ -38,4 +38,8 @@ public class GetFreePort { return port; } + private GetFreePort() { + + } + }