[
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: 10.7.1.1
> Reporter: Dave Brosius
> Priority: Trivial
> Fix For: 10.8.0.0
>
> 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