Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapster committed Feb 27, 2024
1 parent bb85249 commit 14e3f2a
Showing 1 changed file with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
*/
package org.primefaces.extensions.model.mongo;

import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.logging.Logger;

import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

import dev.morphia.Datastore;
import dev.morphia.query.FindOptions;
import dev.morphia.query.MorphiaCursor;
Expand All @@ -39,21 +55,6 @@
import org.primefaces.util.SerializableFunction;
import org.primefaces.util.SerializableSupplier;

import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.logging.Logger;

/**
* Basic {@link LazyDataModel} implementation for MongoDB using Morphia.
*
Expand Down Expand Up @@ -329,7 +330,7 @@ private Object castedValue(final String field, final Object value) {
return ComponentUtils.convertToType(value, declaredField.getType(), LOGGER);
}
catch (final ReflectiveOperationException e) {
throw new FacesException("Failed to convert " + field + " to its corresponding data type", e);
throw new FacesException(e);
}
}

Expand Down

0 comments on commit 14e3f2a

Please sign in to comment.