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; ...@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
public class AsAdminInvoker { public class AsAdminInvoker {
@AsAdmin @AsAdmin
public void invoke(Callable callable) throws Exception { public void invoke(Callable<?> callable) throws Exception {
callable.call(); callable.call();
} }
......
...@@ -47,8 +47,7 @@ public class SpringOvalValidator implements org.springframework.validation.Valid ...@@ -47,8 +47,7 @@ public class SpringOvalValidator implements org.springframework.validation.Valid
this.validator = validator; this.validator = validator;
} }
@SuppressWarnings("unchecked") public boolean supports(Class<?> clazz) {
public boolean supports(Class clazz) {
return true; return true;
} }
...@@ -56,7 +55,6 @@ public class SpringOvalValidator implements org.springframework.validation.Valid ...@@ -56,7 +55,6 @@ public class SpringOvalValidator implements org.springframework.validation.Valid
doValidate(target, errors, ""); doValidate(target, errors, "");
} }
@SuppressWarnings("unchecked")
private void doValidate(Object target, Errors errors, String fieldPrefix) { private void doValidate(Object target, Errors errors, String fieldPrefix) {
try { try {
for (ConstraintViolation violation : validator.validate(target)) { for (ConstraintViolation violation : validator.validate(target)) {
...@@ -128,15 +126,13 @@ public class SpringOvalValidator implements org.springframework.validation.Valid ...@@ -128,15 +126,13 @@ public class SpringOvalValidator implements org.springframework.validation.Valid
} }
} }
@SuppressWarnings("unchecked")
private Field[] getFields(Object target) { private Field[] getFields(Object target) {
Class clazz = target.getClass(); Class<?> clazz = target.getClass();
List<Field> fields = doGetFields(clazz); List<Field> fields = doGetFields(clazz);
return fields.toArray(new Field[fields.size()]); 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>(); ArrayList<Field> list = new ArrayList<Field>();
Field[] fields = clazz.getDeclaredFields(); Field[] fields = clazz.getDeclaredFields();
list.addAll(Arrays.asList(fields)); 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