Michael Pasternak has uploaded a new change for review. Change subject: sdk: apache PropertyUtilsBean throws NoSuchMethodException #1007266 ......................................................................
sdk: apache PropertyUtilsBean throws NoSuchMethodException #1007266 Change-Id: I4465ad61b405b1b2447f7817391a286ad4f9d311 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1007266 Signed-off-by: Michael pasternak <[email protected]> --- M ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/mapping/Mapper.java 1 file changed, 10 insertions(+), 15 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk-java refs/changes/62/19262/1 diff --git a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/mapping/Mapper.java b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/mapping/Mapper.java index d31899e..237818e 100644 --- a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/mapping/Mapper.java +++ b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/mapping/Mapper.java @@ -60,16 +60,10 @@ } catch (InstantiationException e) { // TODO: log error e.printStackTrace(); - } catch (IllegalAccessException e) { - // TODO: log error - e.printStackTrace(); + } catch (IllegalAccessException | NoSuchMethodException | + InvocationTargetException e) { + // do nothing (PropertyUtils exceptions treatment #1007266) } catch (IllegalArgumentException e) { - // TODO: log error - e.printStackTrace(); - } catch (InvocationTargetException e) { - // TODO: log error - e.printStackTrace(); - } catch (NoSuchMethodException e) { // TODO: log error e.printStackTrace(); } @@ -81,14 +75,15 @@ * Excludes mapping exceptions * * @param dstobj - * - * @throws IllegalAccessException - * @throws InvocationTargetException - * @throws NoSuchMethodException */ - private static <T> void excludeExceptions(T dstobj) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { + private static <T> void excludeExceptions(T dstobj) { for (String field : MAPPING_EXCEPTIONS) { - PropertyUtils.setProperty(dstobj, field, null); + try { + PropertyUtils.setProperty(dstobj, field, null); + } catch (IllegalAccessException | InvocationTargetException | + NoSuchMethodException e) { + // do nothing (PropertyUtils exceptions treatment #1007266) + } } } -- To view, visit http://gerrit.ovirt.org/19262 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4465ad61b405b1b2447f7817391a286ad4f9d311 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk-java Gerrit-Branch: master Gerrit-Owner: Michael Pasternak <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
