diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 15:40:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:01 +0200 |
commit | b65017a2a7af290f6681da7b197a52efe83d5185 (patch) | |
tree | 06f71a435ba200d044109469b13be7c8f5dbe950 /qadevOOo/runner/util/ValueChanger.java | |
parent | 33ec740d1438c3dddf8e1974757ed05bb76425ca (diff) |
Java5 update - usage generics where possible
Change-Id: I12f8c448961919e153047e28fee2a0acf3af1002
Diffstat (limited to 'qadevOOo/runner/util/ValueChanger.java')
-rw-r--r-- | qadevOOo/runner/util/ValueChanger.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java index b2e9b2873654..00c86ff4138e 100644 --- a/qadevOOo/runner/util/ValueChanger.java +++ b/qadevOOo/runner/util/ValueChanger.java @@ -748,7 +748,7 @@ public class ValueChanger { if (oldValue instanceof com.sun.star.uno.Enum) { // universal changer for Enumerations try { - Class enumClass = oldValue.getClass() ; + Class<?> enumClass = oldValue.getClass() ; Field[] flds = enumClass.getFields() ; newValue = null ; @@ -861,7 +861,7 @@ public class ValueChanger { } else if (oldValue.getClass().isArray()) { // changer for arrays : changes all elements - Class arrType = oldValue.getClass().getComponentType() ; + Class<?> arrType = oldValue.getClass().getComponentType() ; newValue = Array.newInstance(arrType, Array.getLength(oldValue)) ; for (int i = 0; i < Array.getLength(newValue); i++) { if (!arrType.isPrimitive()) { @@ -900,13 +900,13 @@ public class ValueChanger { } else if (isStructure(oldValue)) { // universal changer for structures - Class clazz = oldValue.getClass() ; + Class<?> clazz = oldValue.getClass() ; try { newValue = clazz.newInstance() ; Field[] fields = clazz.getFields(); for (int i = 0; i < fields.length; i++) { if ((fields[i].getModifiers() & Modifier.PUBLIC) != 0) { - Class fType = fields[i].getType() ; + Class<?> fType = fields[i].getType() ; Field field = fields[i] ; if (!fType.isPrimitive()) { field.set(newValue, changePValue(field.get(oldValue))); |