Removal of some unused internal methods, plus additional tests for some areas lacking coverage.
This commit is contained in:
@@ -23,29 +23,13 @@ import java.lang.reflect.Field;
|
||||
|
||||
|
||||
/**
|
||||
* Offers static methods for directly manipulating static fields.
|
||||
* Offers static methods for directly manipulating fields.
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public final class FieldUtils {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
private FieldUtils() {
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public static String getAccessorName(String fieldName, Class<?> type) {
|
||||
Assert.hasText(fieldName, "FieldName required");
|
||||
Assert.notNull(type, "Type required");
|
||||
|
||||
if (type.getName().equals("boolean")) {
|
||||
return "is" + org.springframework.util.StringUtils.capitalize(fieldName);
|
||||
} else {
|
||||
return "get" + org.springframework.util.StringUtils.capitalize(fieldName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to locate the specified field on the class.
|
||||
*
|
||||
@@ -98,12 +82,6 @@ public final class FieldUtils {
|
||||
|
||||
}
|
||||
|
||||
public static String getMutatorName(String fieldName) {
|
||||
Assert.hasText(fieldName, "FieldName required");
|
||||
|
||||
return "set" + org.springframework.util.StringUtils.capitalize(fieldName);
|
||||
}
|
||||
|
||||
public static Object getProtectedFieldValue(String protectedField, Object object) {
|
||||
Field field = FieldUtils.getField(object.getClass(), protectedField);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class InMemoryResource extends AbstractResource {
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return source.hashCode();
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean equals(Object res) {
|
||||
|
||||
@@ -31,10 +31,6 @@ import org.springframework.util.Assert;
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public final class MethodInvocationUtils {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
private MethodInvocationUtils() {
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user