You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2009/05/18 04:55:45 UTC
[jira] Created: (RIVER-310) [patch] fix possible NPE due to
incorrectly ordered if guard
[patch] fix possible NPE due to incorrectly ordered if guard
------------------------------------------------------------
Key: RIVER-310
URL: https://issues.apache.org/jira/browse/RIVER-310
Project: River
Issue Type: Improvement
Environment: NA
Reporter: Dave Brosius
Priority: Trivial
Attachments: fix_possible_npe.diff
Code improperly orders null length 0 guard, opening the possibility of a NPE
patch fixes
- if ((name.length() == 0) || (name == null)) {
+ if ((name == null) || (name.length() == 0)) {
throw new IOException("no name specified in preference" +
" expression");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (RIVER-310) [patch] fix possible NPE due to
incorrectly ordered if guard
Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12724846#action_12724846 ]
Peter Firmstone commented on RIVER-310:
---------------------------------------
Thanks for the patches Dave, I've been very busy lately so do apologize for the delay.
Thank you,
Peter.
> [patch] fix possible NPE due to incorrectly ordered if guard
> ------------------------------------------------------------
>
> Key: RIVER-310
> URL: https://issues.apache.org/jira/browse/RIVER-310
> Project: River
> Issue Type: Improvement
> Environment: NA
> Reporter: Dave Brosius
> Assignee: Peter Firmstone
> Priority: Trivial
> Attachments: fix_possible_npe.diff
>
>
> Code improperly orders null length 0 guard, opening the possibility of a NPE
> patch fixes
> - if ((name.length() == 0) || (name == null)) {
> + if ((name == null) || (name.length() == 0)) {
> throw new IOException("no name specified in preference" +
> " expression");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (RIVER-310) [patch] fix possible NPE due to
incorrectly ordered if guard
Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Firmstone resolved RIVER-310.
-----------------------------------
Resolution: Fixed
Patches supplied checked & merged.
> [patch] fix possible NPE due to incorrectly ordered if guard
> ------------------------------------------------------------
>
> Key: RIVER-310
> URL: https://issues.apache.org/jira/browse/RIVER-310
> Project: River
> Issue Type: Improvement
> Environment: NA
> Reporter: Dave Brosius
> Assignee: Peter Firmstone
> Priority: Trivial
> Attachments: fix_possible_npe.diff
>
>
> Code improperly orders null length 0 guard, opening the possibility of a NPE
> patch fixes
> - if ((name.length() == 0) || (name == null)) {
> + if ((name == null) || (name.length() == 0)) {
> throw new IOException("no name specified in preference" +
> " expression");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (RIVER-310) [patch] fix possible NPE due to
incorrectly ordered if guard
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated RIVER-310:
-------------------------------
Attachment: fix_possible_npe.diff
> [patch] fix possible NPE due to incorrectly ordered if guard
> ------------------------------------------------------------
>
> Key: RIVER-310
> URL: https://issues.apache.org/jira/browse/RIVER-310
> Project: River
> Issue Type: Improvement
> Environment: NA
> Reporter: Dave Brosius
> Priority: Trivial
> Attachments: fix_possible_npe.diff
>
>
> Code improperly orders null length 0 guard, opening the possibility of a NPE
> patch fixes
> - if ((name.length() == 0) || (name == null)) {
> + if ((name == null) || (name.length() == 0)) {
> throw new IOException("no name specified in preference" +
> " expression");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (RIVER-310) [patch] fix possible NPE due to
incorrectly ordered if guard
Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Firmstone reassigned RIVER-310:
-------------------------------------
Assignee: Peter Firmstone
> [patch] fix possible NPE due to incorrectly ordered if guard
> ------------------------------------------------------------
>
> Key: RIVER-310
> URL: https://issues.apache.org/jira/browse/RIVER-310
> Project: River
> Issue Type: Improvement
> Environment: NA
> Reporter: Dave Brosius
> Assignee: Peter Firmstone
> Priority: Trivial
> Attachments: fix_possible_npe.diff
>
>
> Code improperly orders null length 0 guard, opening the possibility of a NPE
> patch fixes
> - if ((name.length() == 0) || (name == null)) {
> + if ((name == null) || (name.length() == 0)) {
> throw new IOException("no name specified in preference" +
> " expression");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (RIVER-310) [patch] fix possible NPE due to
incorrectly ordered if guard
Posted by "Peter Jones (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710457#action_12710457 ]
Peter Jones commented on RIVER-310:
-----------------------------------
That patch looks fine to me, FWIW. I think that the null check there is actually superfluous anyway, because this private method (mapPut) is only invoked by the private "read" method with values that cannot be null (either the result of a String.substring invocation, or the value of "name" itself when it has already been proven non-null).
> [patch] fix possible NPE due to incorrectly ordered if guard
> ------------------------------------------------------------
>
> Key: RIVER-310
> URL: https://issues.apache.org/jira/browse/RIVER-310
> Project: River
> Issue Type: Improvement
> Environment: NA
> Reporter: Dave Brosius
> Priority: Trivial
> Attachments: fix_possible_npe.diff
>
>
> Code improperly orders null length 0 guard, opening the possibility of a NPE
> patch fixes
> - if ((name.length() == 0) || (name == null)) {
> + if ((name == null) || (name.length() == 0)) {
> throw new IOException("no name specified in preference" +
> " expression");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.