Commit 27d1480f authored by Matija Obreza's avatar Matija Obreza
Browse files

Resolve warnings

parent 7ee51342
......@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
public class AsAdminInvoker {
@AsAdmin
public void invoke(Callable callable) throws Exception {
public void invoke(Callable<?> callable) throws Exception {
callable.call();
}
......
......@@ -47,8 +47,7 @@ public class SpringOvalValidator implements org.springframework.validation.Valid
this.validator = validator;
}
@SuppressWarnings("unchecked")
public boolean supports(Class clazz) {
public boolean supports(Class<?> clazz) {
return true;
}
......@@ -56,7 +55,6 @@ public class SpringOvalValidator implements org.springframework.validation.Valid
doValidate(target, errors, "");
}
@SuppressWarnings("unchecked")
private void doValidate(Object target, Errors errors, String fieldPrefix) {
try {
for (ConstraintViolation violation : validator.validate(target)) {
......@@ -128,15 +126,13 @@ public class SpringOvalValidator implements org.springframework.validation.Valid
}
}
@SuppressWarnings("unchecked")
private Field[] getFields(Object target) {
Class clazz = target.getClass();
Class<?> clazz = target.getClass();
List<Field> fields = doGetFields(clazz);
return fields.toArray(new Field[fields.size()]);
}
@SuppressWarnings("unchecked")
private List<Field> doGetFields(Class clazz) {
private List<Field> doGetFields(Class<?> clazz) {
ArrayList<Field> list = new ArrayList<Field>();
Field[] fields = clazz.getDeclaredFields();
list.addAll(Arrays.asList(fields));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment