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] [Closed] (OFBIZ-9718) [FB] Package org.apache.ofbiz.entity.connection
Date Fri, 08 Dec 2017 19:46:00 GMT

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

Michael Brohl closed OFBIZ-9718.
--------------------------------
       Resolution: Implemented
    Fix Version/s: Upcoming Release

Thanks Julian,

your patch is in trunk r1817552. 

> [FB] Package org.apache.ofbiz.entity.connection
> -----------------------------------------------
>
>                 Key: OFBIZ-9718
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9718
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: ALL APPLICATIONS, ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Julian Leichert
>            Assignee: Michael Brohl
>            Priority: Minor
>             Fix For: Upcoming Release
>
>         Attachments: OFBIZ-9718_org.apache.ofbiz.entity.connection_bugfixes.patch
>
>
> DBCPConnectionFactory.java:169, SIO_SUPERFLUOUS_INSTANCEOF
> - SIO: org.apache.ofbiz.entity.connection.DBCPConnectionFactory.getDataSourceInfo(String)
does an unnecessary type check using instanceof operator when it can be determined statically
> Type check performed using the instanceof operator where it can be statically determined
whether the object is of the type requested.
> DBCPConnectionFactory.java:169, BC_VACUOUS_INSTANCEOF
> - BC: instanceof will always return true for all nonnull values in org.apache.ofbiz.entity.connection.DBCPConnectionFactory.getDataSourceInfo(String),
since all org.apache.ofbiz.entity.connection.DebugManagedDataSource are instances of org.apache.ofbiz.entity.connection.DebugManagedDataSource
> This instanceof test will always return true (unless the value being tested is null).
Although this is safe, make sure it isn't an indication of some misunderstanding or some other
logic error. If you really want to test the value for being null, perhaps it would be clearer
to do better to do a null test rather than an instanceof test.



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

Mime
View raw message