ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Brohl (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (OFBIZ-9717) [FB] Package org.apache.ofbiz.entity.config.model
Date Fri, 08 Dec 2017 19:35:01 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-9717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Brohl reassigned OFBIZ-9717:
------------------------------------

    Assignee: Michael Brohl

> [FB] Package org.apache.ofbiz.entity.config.model
> -------------------------------------------------
>
>                 Key: OFBIZ-9717
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9717
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: ALL APPLICATIONS, ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Julian Leichert
>            Assignee: Michael Brohl
>            Priority: Minor
>         Attachments: OFBIZ-9717_org.apache.ofbiz.entity.config.model_bugfixes.patch
>
>
> Datasource.java:176, REC_CATCH_EXCEPTION
> - REC: Exception is caught when Exception is not thrown in new org.apache.ofbiz.entity.config.model.Datasource(Element)
> This method uses a try-catch block that catches Exception objects, but Exception is not
thrown within the try block, and RuntimeException is not explicitly caught. It is a common
bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching
a number of types of exception each of whose catch blocks is identical, but this construct
also accidentally catches RuntimeException as well, masking potential bugs.
> A better approach is to either explicitly catch the specific exceptions that are thrown,
or to explicitly catch RuntimeException exception, rethrow it, and then catch all non-Runtime
Exceptions, as shown below:
>   try {
>     ...
>   } catch (RuntimeException e) {
>     throw e;
>   } catch (Exception e) {
>     ... deal with all non-runtime exceptions ...
>   }
> GroupMap.java:57, NM_CONFUSING
> - Nm: Confusing to have methods org.apache.ofbiz.entity.config.model.GroupMap.getDatasourceName()
and org.apache.ofbiz.entity.config.model.TyrexDataSource.getDataSourceName()
> The referenced methods have names that differ only by capitalization.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message