diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java b/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java index e2d7cb5d54..23b8e0bdb6 100644 --- a/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java +++ b/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceServices.java @@ -85,9 +85,6 @@ public class PreferenceServices { if (preference != null) { userPrefMap = PreferenceWorker.createUserPrefMap(preference); } - } catch (GenericEntityException e) { - Debug.logWarning(e.getMessage(), module); - return ServiceUtil.returnError(UtilProperties.getMessage(resource, "getPreference.readFailure", new Object[] { e.getMessage() }, locale)); } catch (GeneralException e) { Debug.logWarning(e.getMessage(), module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, "getPreference.readFailure", new Object[] { e.getMessage() }, locale)); @@ -135,9 +132,6 @@ public class PreferenceServices { fieldMap.put("userLoginId", userLoginId); userPrefMap.putAll(PreferenceWorker.createUserPrefMap(EntityQuery.use(delegator).from("UserPreference").where(fieldMap).cache(true).queryList())); } - } catch (GenericEntityException e) { - Debug.logWarning(e.getMessage(), module); - return ServiceUtil.returnError(UtilProperties.getMessage(resource, "getPreference.readFailure", new Object[] { e.getMessage() }, locale)); } catch (GeneralException e) { Debug.logWarning(e.getMessage(), module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, "getPreference.readFailure", new Object[] { e.getMessage() }, locale)); @@ -185,9 +179,6 @@ public class PreferenceServices { } GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, userPrefTypeId, userPrefGroupTypeId, userPrefValue)); delegator.createOrStore(rec); - } catch (GenericEntityException e) { - Debug.logWarning(e.getMessage(), module); - return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.writeFailure", new Object[] { e.getMessage() }, locale)); } catch (GeneralException e) { Debug.logWarning(e.getMessage(), module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.writeFailure", new Object[] { e.getMessage() }, locale)); @@ -247,9 +238,6 @@ public class PreferenceServices { GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, mapEntry.getKey(), userPrefGroupTypeId, mapEntry.getValue())); delegator.createOrStore(rec); } - } catch (GenericEntityException e) { - Debug.logWarning(e.getMessage(), module); - return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.writeFailure", new Object[] { e.getMessage() }, locale)); } catch (GeneralException e) { Debug.logWarning(e.getMessage(), module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.writeFailure", new Object[] { e.getMessage() }, locale)); diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java b/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java index 64d13ecc5c..1dc36362cd 100644 --- a/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java +++ b/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java @@ -52,7 +52,7 @@ public final class PreferenceWorker { private static final String DEFAULT_UID = "_NA_"; private PreferenceWorker () {} - + /** * Add a UserPreference GenericValue to a Map. * @param rec GenericValue to convert