Investigate two functions in ContactItem.java which can cause issues

Description

reported at: http://www.igniterealtime.org/community/message/196070

On a system I unfortunately do not currently have access to Spark would not start without some changes to src/java/org/jivesoftware/spark/ui/ContactItem.java. This function checks a length against displayName.length(), but then uses StringUtils.unescape on displayName before using that length with substring(). unescape can make the string shorter, so that substring call can fail. I'm not sure why it did that consistently for me on only one system, though, and I can't currently tell you exactly what the failure mode was, but I do recall it made spark unusable (either no contacts window at all or an empty one).

Also, the getMainWindowHeight() call in the same function should almost certainly be getMainWindowWidth().

Environment

None

Activity

Show:

Walter Ebeling February 24, 2013 at 9:43 AM

Still an issue?

Neil McFarlane September 21, 2010 at 11:54 PM

2.6.1 --> 2.7

Incomplete

Priority

Assignee

Reporter

Affects versions

Fix versions

Components

Created October 18, 2009 at 6:19 PM
Updated February 24, 2013 at 12:09 PM
Resolved February 24, 2013 at 12:09 PM