}
@Override
+ @SuppressWarnings("checkstyle:illegalCatch")
public Object deserialize(final Object input) {
Preconditions.checkArgument(input instanceof Set);
@SuppressWarnings("unchecked")
final Set<String> casted = (Set<String>) input;
/*
- * We can do this walk based on field set sorted by name,
- * since constructor arguments in Java Binding are sorted by name.
+ * We can do this walk based on field set sorted by name, since constructor arguments in Java Binding are
+ * sorted by name.
*
- * This means we will construct correct array for construction
- * of bits object.
+ * This means we will construct correct array for construction of bits object.
*/
- final Boolean args[] = new Boolean[ctorArgs.size()];
+ final Boolean[] args = new Boolean[ctorArgs.size()];
int currentArg = 0;
for (String value : ctorArgs) {
args[currentArg++] = casted.contains(value);
for (Entry<String, Method> valueGet : getters.entrySet()) {
final Boolean value;
try {
- value = (Boolean) valueGet.getValue().invoke(input);
+ value = (Boolean) valueGet.getValue().invoke(input);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new IllegalArgumentException("Failed to get bit " + valueGet.getKey(), e);
}