| Summary: | user name containing underscore breaks the UsersActivityStatsService | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Portal Platform 4 | Reporter: | Gary Hu <garyhu2> |
| Component: | unspecified | Assignee: | Gary Hu <garyhu2> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.3.0.GA_CP3 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.3.0.GA_CP5 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/JBEPP-157 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-02-08 23:08:54 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Gary Hu
2010-02-03 16:49:35 UTC
Link: Added: This issue depends JBPORTAL-2470 There is no need to back port to any portal version. The fix will go to EPP 4.3-CP03 branch only. There's no dependence on the JBPORTAL-2470. And here is the description of this issue.
If a user name contains underscore, for example "john_dow", it breaks the UsersActivityStatsService MBean sevice.
This is the code from UsersActivityStatsServiceImpl:
public void registerActivity(final UserActivity userActivity)
{
try
{
Notification notification = new Notification(Integer.toString(userActivity.getType()), this.getServiceName(),
userActivity.getTimestamp(), userActivity.getTimestamp(), userActivity.getId() + "_"
+ userActivity.getSessionId());
....
And here is the code from UserActivity:
public UserActivity(Notification notification)
{
if (notification.getMessage() == null)
{
throw new IllegalArgumentException("Id (notification message) cannot be null");
}
this.id = notification.getMessage().substring(0, notification.getMessage().indexOf("_"));
this.sessionId = notification.getMessage().substring(notification.getMessage().indexOf("_"));
this.timestamp = notification.getTimeStamp();
this.type = Integer.parseInt(notification.getType());
}
Link: Removed: This issue depends JBPORTAL-2470 issue has been resolved. Link: Added: This issue related JBEPP-159 This fix has been committed to EPP 4.3 branch that will be picked up by next CP release. |