You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2011/03/01 07:25:36 UTC
[jira] Created: (DERBY-5077) [patch] remove non productive
instanceof checks
[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
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
[jira] [Resolved] (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan resolved DERBY-5077.
------------------------------------
Resolution: Fixed
Fix Version/s: (was: 10.8.1.6)
10.9.0.0
Assignee: Kristian Waagan
Issue & fix info: (was: [Patch Available])
Committed to trunk with revision 1145926.
> [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
> Assignee: Kristian Waagan
> Priority: Trivial
> Fix For: 10.9.0.0
>
> Attachments: derby-5077-1a-remove_useless_instanceofs.diff, 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
[jira] Updated: (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated DERBY-5077:
--------------------------------
Attachment: (was: remove_useless_instanceofs.diff)
> [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
>
> 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
[jira] [Updated] (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan updated DERBY-5077:
-----------------------------------
Attachment: derby-5077-1a-remove_useless_instanceofs.diff
Attaching patch 1a, which is the original patch with some additional changes:
o removed one more instanceof in SubqueryNode
o made checkColumnOrdering in MergeSort private and rewrote the comment. Still not sure if checking if the column is null adds value, but keeping it is no big deal (the method is only called from a sanity block)
o merged two SanityManager.DEBUG blocks.
Running the tests, will commit if they pass.
> [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.1.6
>
> Attachments: derby-5077-1a-remove_useless_instanceofs.diff, 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
[jira] [Updated] (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan updated DERBY-5077:
-----------------------------------
Component/s: (was: Network Server)
Store
SQL
> [patch] remove non productive instanceof checks
> -----------------------------------------------
>
> Key: DERBY-5077
> URL: https://issues.apache.org/jira/browse/DERBY-5077
> Project: Derby
> Issue Type: Improvement
> Components: SQL, Store
> Affects Versions: 10.7.1.1
> Reporter: Dave Brosius
> Assignee: Kristian Waagan
> Priority: Trivial
> Fix For: 10.9.0.0
>
> Attachments: derby-5077-1a-remove_useless_instanceofs.diff, 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
[jira] [Updated] (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-5077:
---------------------------------
Fix Version/s: (was: 10.8.1.2)
10.8.1.3
> [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.1.3
>
> 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
[jira] Commented: (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000888#comment-13000888 ]
Dave Brosius commented on DERBY-5077:
-------------------------------------
good point, i'll take a look and resubmit
> [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
[jira] Commented: (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ 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
[jira] Updated: (DERBY-5077) [patch] remove non productive
instanceof checks
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated DERBY-5077:
--------------------------------
Attachment: remove_useless_instanceofs.diff
determined the places where instanceof checks might detect null values, and replace with null checking. The rest of the places the instanceof was removed.
> [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