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] Commented: (DERBY-5077) [patch] remove non productive instanceof checks
Date Tue, 01 Mar 2011 08:37:37 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000775#comment-13000775

Knut Anders Hatlen commented on DERBY-5077:

Note that instanceof checks return false if the object is null, even if the statically known
type matches the type in the check. So unless we know that the object is non-null, simply
removing the check isn't safe. I haven't checked if that's a problem in the code that's touched
by the patch, but thought I'd raise the issue.

> [patch] remove non productive instanceof checks
> -----------------------------------------------
>                 Key: DERBY-5077
>                 URL: https://issues.apache.org/jira/browse/DERBY-5077
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server
>    Affects Versions:
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For:
>         Attachments: remove_useless_instanceofs.diff
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> various places in code does instanceof checks where the outcome can be determined statically
to be always true or always false.
> removed these checks as they do nothing.

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


View raw message