details: https://code.openbravo.com/erp/devel/pi/rev/dc6646d8f5d1 changeset: 29436:dc6646d8f5d1 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri May 06 08:50:17 2016 +0200 summary: related to bug 32819: An error is thrown when a Query List Widget is fetched
Minor code cleanup fixes: -Using equals to compare Strings instead of == oprator. In this case it was working fine because ids were pointing to the same String instance because it was reused by DAL's cache. In any case, it is more correct not to check if they are the same instance but if the strings are equal. -Fixed typo diffstat: modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (18 lines): diff -r 2e18a7bfef3a -r dc6646d8f5d1 modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java --- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java Fri May 06 08:10:54 2016 +0200 +++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java Fri May 06 08:50:17 2016 +0200 @@ -102,12 +102,12 @@ accessibleWidgetInForm = isAccessibleWidgetInForm(widgetClass); } if (!accessibleWidgetInForm - && (wi == null || wi.getWidgetClass().getId() != widgetClass.getId())) { + && (wi == null || !wi.getWidgetClass().getId().equals(widgetClass.getId()))) { // weird stuff: widget class doesn't match widget instance's class, most probably URL is // not generated by UI, but user is typing it log.error("User " + OBContext.getOBContext().getUser() + " with role " + OBContext.getOBContext().getRole() + " is trying to access widget '" - + widgetClass.getWidgetTitle() + "' but widget istance doesn't match with class"); + + widgetClass.getWidgetTitle() + "' but widget instance doesn't match with class"); throw new OBSecurityException(OBMessageUtils.getI18NMessage("OBCQL_NoAccessToWidget", new String[] { widgetClass.getWidgetTitle() })); } ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits