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/06/19 09:45:47 UTC
[jira] [Created] (DERBY-5285) [patch] avoid npe if tempCongloms is
null
[patch] avoid npe if tempCongloms is null
-----------------------------------------
Key: DERBY-5285
URL: https://issues.apache.org/jira/browse/DERBY-5285
Project: Derby
Issue Type: Improvement
Components: Store
Affects Versions: 10.8.1.4
Reporter: Dave Brosius
Priority: Trivial
Fix For: 10.8.1.4
if (tempCongloms != null)
tempCongloms.remove(new Long(conglomId));
tempCongloms.put(new Long(conglomId), conglom);
code guards against tempCongloms being null for the remove, but not for the put. so put the put in the if statement.
Then realized that the remove is superfluous, as the put will overright so just removed the remove.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5285) [patch] avoid npe if tempCongloms
is null
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051835#comment-13051835 ]
Knut Anders Hatlen commented on DERBY-5285:
-------------------------------------------
This issue looks like DERBY-3371. According to the analysis there, the code in question is a no-op and could be removed. The variable conglom is initialized by calling findConglomerate(). Since conglomId is negative in the case affected by the patch, findConglomerate() returns tempCongloms.get(new Long(conglomId)). So when we end up calling tempCongloms.put(new Long(conglomId), conglom) in addColumnToConglomerate(), we're just replacing one object with itself.
> [patch] avoid npe if tempCongloms is null
> -----------------------------------------
>
> Key: DERBY-5285
> URL: https://issues.apache.org/jira/browse/DERBY-5285
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.8.1.4
> Reporter: Dave Brosius
> Assignee: Mike Matrigali
> Priority: Trivial
> Fix For: 10.8.1.4
>
> Attachments: npe_guard.diff
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> if (tempCongloms != null)
> tempCongloms.remove(new Long(conglomId));
> tempCongloms.put(new Long(conglomId), conglom);
> code guards against tempCongloms being null for the remove, but not for the put. so put the put in the if statement.
> Then realized that the remove is superfluous, as the put will overright so just removed the remove.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (DERBY-5285) [patch] avoid npe if tempCongloms is
null
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated DERBY-5285:
--------------------------------
Attachment: npe_guard.diff
> [patch] avoid npe if tempCongloms is null
> -----------------------------------------
>
> Key: DERBY-5285
> URL: https://issues.apache.org/jira/browse/DERBY-5285
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.8.1.4
> Reporter: Dave Brosius
> Priority: Trivial
> Fix For: 10.8.1.4
>
> Attachments: npe_guard.diff
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> if (tempCongloms != null)
> tempCongloms.remove(new Long(conglomId));
> tempCongloms.put(new Long(conglomId), conglom);
> code guards against tempCongloms being null for the remove, but not for the put. so put the put in the if statement.
> Then realized that the remove is superfluous, as the put will overright so just removed the remove.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (DERBY-5285) [patch] avoid npe if tempCongloms is
null
Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Matrigali reassigned DERBY-5285:
-------------------------------------
Assignee: Mike Matrigali
> [patch] avoid npe if tempCongloms is null
> -----------------------------------------
>
> Key: DERBY-5285
> URL: https://issues.apache.org/jira/browse/DERBY-5285
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.8.1.4
> Reporter: Dave Brosius
> Assignee: Mike Matrigali
> Priority: Trivial
> Fix For: 10.8.1.4
>
> Attachments: npe_guard.diff
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> if (tempCongloms != null)
> tempCongloms.remove(new Long(conglomId));
> tempCongloms.put(new Long(conglomId), conglom);
> code guards against tempCongloms being null for the remove, but not for the put. so put the put in the if statement.
> Then realized that the remove is superfluous, as the put will overright so just removed the remove.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (DERBY-5285) [patch] avoid npe if tempCongloms is
null
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen resolved DERBY-5285.
---------------------------------------
Resolution: Duplicate
Fix Version/s: (was: 10.8.2.2)
10.10.0.0
Issue & fix info: (was: Patch Available)
Marking the issue as resolved, as DERBY-3371 has been fixed.
> [patch] avoid npe if tempCongloms is null
> -----------------------------------------
>
> Key: DERBY-5285
> URL: https://issues.apache.org/jira/browse/DERBY-5285
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.8.2.2
> Reporter: Dave Brosius
> Assignee: Mike Matrigali
> Priority: Trivial
> Fix For: 10.10.0.0
>
> Attachments: npe_guard.diff
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> if (tempCongloms != null)
> tempCongloms.remove(new Long(conglomId));
> tempCongloms.put(new Long(conglomId), conglom);
> code guards against tempCongloms being null for the remove, but not for the put. so put the put in the if statement.
> Then realized that the remove is superfluous, as the put will overright so just removed the remove.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5285) [patch] avoid npe if tempCongloms
is null
Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051738#comment-13051738 ]
Mike Matrigali commented on DERBY-5285:
---------------------------------------
I'll look at committing this. Did you run any tests on your patch, if so what were the results?
/mikem
> [patch] avoid npe if tempCongloms is null
> -----------------------------------------
>
> Key: DERBY-5285
> URL: https://issues.apache.org/jira/browse/DERBY-5285
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.8.1.4
> Reporter: Dave Brosius
> Assignee: Mike Matrigali
> Priority: Trivial
> Fix For: 10.8.1.4
>
> Attachments: npe_guard.diff
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> if (tempCongloms != null)
> tempCongloms.remove(new Long(conglomId));
> tempCongloms.put(new Long(conglomId), conglom);
> code guards against tempCongloms being null for the remove, but not for the put. so put the put in the if statement.
> Then realized that the remove is superfluous, as the put will overright so just removed the remove.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira