From: <pn...@hy...> - 2010-03-11 22:10:12
|
Author: pnguyen Date: 2010-03-11 14:10:01 -0800 (Thu, 11 Mar 2010) New Revision: 14372 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14372 Modified: trunk/ui_plugins/eventcenter/app/EventController.groovy Log: [HHQ-3743] Fix StringIndexOutOfBoundsException issue Modified: trunk/ui_plugins/eventcenter/app/EventController.groovy =================================================================== --- trunk/ui_plugins/eventcenter/app/EventController.groovy 2010-03-11 18:57:02 UTC (rev 14371) +++ trunk/ui_plugins/eventcenter/app/EventController.groovy 2010-03-11 22:10:01 UTC (rev 14372) @@ -76,7 +76,9 @@ if (l.type == ResourceLogEvent.class.name) { def subject = l.subject + ": " def detail = l.detail - if (detail.startsWith(subject)) { + if (subject.equals(detail)) { + detail = '' + } else if (detail.startsWith(subject)) { detail = detail[subject.length()..detail.length()-1] } return detail |