Author: bdaw
Date: 2010-03-22 07:48:01 -0400 (Mon, 22 Mar 2010)
New Revision: 2338
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserProfileDAOImpl.java
Log:
- GTNPORTAL-886 - simple check to fix NPE
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserProfileDAOImpl.java
===================================================================
---
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserProfileDAOImpl.java 2010-03-22
10:12:00 UTC (rev 2337)
+++
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserProfileDAOImpl.java 2010-03-22
11:48:01 UTC (rev 2338)
@@ -261,7 +261,15 @@
// Check if attribute is part of User interface data
if (!UserDAOImpl.USER_NON_PROFILE_KEYS.contains(key))
{
- filteredAttrs.put(key, attrs.get(key).getValue().toString());
+ Object value = attrs.get(key).getValue();
+ if (value != null)
+ {
+ filteredAttrs.put(key, value.toString());
+ }
+ else
+ {
+ filteredAttrs.put(key, null);
+ }
}
}
Show replies by date