portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Updated: (JS2-664) getPreference returns null with a default value of ""
Date Sat, 17 Mar 2007 01:02:09 GMT

     [ https://issues.apache.org/jira/browse/JS2-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Sean Taylor updated JS2-664:
----------------------------------

          Component/s: Portlet Entities and Preferences
        Fix Version/s: 2.2-dev
             Assignee: David Sean Taylor
          Description: 
The User Browser was getting a NPE exception since the code expected "" to be returned from
getPreferences().getValue with a default value provided:

        String roleFilter = request.getPreferences().getValue("FilterByRole", "");
        if (roleFilter == null)
            roleFilter = "";

See commit:
http://svn.apache.org/viewvc?view=rev&revision=519196

When a default value of "" is provided, it would be expected to get back "", not NULL
However, NULL is being returned at times
It seems that this only occurs with an Oracle database backend
    Affects Version/s: 2.2-dev

> getPreference returns null with a default value of ""
> -----------------------------------------------------
>
>                 Key: JS2-664
>                 URL: https://issues.apache.org/jira/browse/JS2-664
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Portlet Entities and Preferences
>    Affects Versions: 2.2-dev
>            Reporter: David Sean Taylor
>         Assigned To: David Sean Taylor
>             Fix For: 2.2-dev
>
>
> The User Browser was getting a NPE exception since the code expected "" to be returned
from getPreferences().getValue with a default value provided:
>         String roleFilter = request.getPreferences().getValue("FilterByRole", "");
>         if (roleFilter == null)
>             roleFilter = "";
> See commit:
> http://svn.apache.org/viewvc?view=rev&revision=519196
> When a default value of "" is provided, it would be expected to get back "", not NULL
> However, NULL is being returned at times
> It seems that this only occurs with an Oracle database backend

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message