powered by Jive Software

Bug sometimes causing exception at startup

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().

SPARK-1098

Closing the ticket. If it is still happening to you with 2.6.3 or the latest 2.7.0 nightly build, please report.