Change-Id: I80b73b653e97904605dc62484a7448f3bfbf721btags/8.0.0.alpha6
@@ -40,6 +40,7 @@ import com.vaadin.server.SerializableBiConsumer; | |||
import com.vaadin.server.SerializableFunction; | |||
import com.vaadin.server.SerializablePredicate; | |||
import com.vaadin.util.ReflectTools; | |||
import java.util.Arrays; | |||
/** | |||
* A {@code Binder} subclass specialized for binding <em>beans</em>: classes | |||
@@ -480,9 +481,7 @@ public class BeanBinder<BEAN> extends Binder<BEAN> { | |||
ArrayList<Field> memberFieldInOrder = new ArrayList<>(); | |||
while (searchClass != null) { | |||
for (Field memberField : searchClass.getDeclaredFields()) { | |||
memberFieldInOrder.add(memberField); | |||
} | |||
memberFieldInOrder.addAll(Arrays.asList(searchClass.getDeclaredFields())); | |||
searchClass = searchClass.getSuperclass(); | |||
} | |||
return memberFieldInOrder; |
@@ -26,6 +26,7 @@ import com.vaadin.server.PaintException; | |||
import com.vaadin.server.PaintTarget; | |||
import com.vaadin.server.VariableOwner; | |||
import com.vaadin.ui.Component; | |||
import java.util.Arrays; | |||
/** | |||
* Javadoc TODO | |||
@@ -249,9 +250,7 @@ public class ActionManager | |||
for (Action.Handler h : actionHandlers) { | |||
Action[] as = h.getActions(target, sender); | |||
if (as != null) { | |||
for (Action a : as) { | |||
actions.add(a); | |||
} | |||
actions.addAll(Arrays.asList(as)); | |||
} | |||
} | |||
} |
@@ -508,9 +508,7 @@ public class ListenerMethod implements EventListener, Serializable { | |||
method.invoke(target, new Object[] { event }); | |||
} else { | |||
final Object[] arg = new Object[arguments.length]; | |||
for (int i = 0; i < arg.length; i++) { | |||
arg[i] = arguments[i]; | |||
} | |||
System.arraycopy(arguments, 0, arg, 0, arg.length); | |||
arg[eventArgumentIndex] = event; | |||
method.invoke(target, arg); | |||
} |
@@ -27,6 +27,7 @@ import java.util.Map; | |||
import java.util.logging.Logger; | |||
import com.vaadin.ui.Component; | |||
import java.util.Arrays; | |||
/** | |||
* Binder utility that binds member fields of a design class instance to given | |||
@@ -249,10 +250,8 @@ public class FieldBinder implements Serializable { | |||
Class<?> searchClass) { | |||
ArrayList<java.lang.reflect.Field> memberFields = new ArrayList<>(); | |||
for (java.lang.reflect.Field memberField : searchClass | |||
.getDeclaredFields()) { | |||
memberFields.add(memberField); | |||
} | |||
memberFields.addAll(Arrays.asList(searchClass | |||
.getDeclaredFields())); | |||
return memberFields; | |||
} | |||
@@ -30,6 +30,7 @@ import org.junit.Assert; | |||
import org.junit.Test; | |||
import com.vaadin.ui.Component; | |||
import java.util.Arrays; | |||
public class ClassesSerializableTest { | |||
@@ -269,9 +270,7 @@ public class ClassesSerializableTest { | |||
} | |||
String[] split = classpath.split(pathSep); | |||
for (String classpathEntry : split) { | |||
locations.add(classpathEntry); | |||
} | |||
locations.addAll(Arrays.asList(split)); | |||
return locations; | |||
} |