db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-5076) [patch] move instanceof check up above where casts occur
Date Tue, 01 Mar 2011 12:08:42 GMT

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

Knut Anders Hatlen updated DERBY-5076:
--------------------------------------

    Attachment: unnecessary_casts.diff

Thanks, Dave!

It looks to me that the casts are unnecessary in the first place, since the declared type
client.am.SqlException implements the Diagnosable interface. Uploading an updated patch that
removes the casts and the instanceof check.

Running regression tests.

> [patch] move instanceof check up above where casts occur
> --------------------------------------------------------
>
>                 Key: DERBY-5076
>                 URL: https://issues.apache.org/jira/browse/DERBY-5076
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.0.0
>
>         Attachments: move_instanceof_check.diff, unnecessary_casts.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> code does an instanceof check on Diagnosable much after multiple casts to Diagnosable
occurs above it.
> Move the instanceof check up before the first cast, so that it does some good.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message