river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius (JIRA)" <j...@apache.org>
Subject [jira] Updated: (RIVER-310) [patch] fix possible NPE due to incorrectly ordered if guard
Date Mon, 18 May 2009 02:55:45 GMT

     [ 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.


Mime
View raw message