[SMACK-362] smack throw NoSuchElementException if the muc#roominfo_subject has no values Created: 15/Dec/11  Updated: 07/Oct/13  Resolved: 21/Dec/11

Status: Closed
Project: Smack
Components: Core
Affects versions: 3.2.1
Fix versions: 3.2.2

Type: Bug Priority: Minor
Reporter: Tim Jentz Assignee: Robin Collier
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: Text File Smack-362_RoomInfo_SubjectDescription.patch     Text File Smack-362_RoomInfo_SubjectNull.patch    
Issue links:
Related to
is related to SPARK-1462 Spark doesn't list rooms when subject... Closed

 Description   

I reviewed this issue for Spark-1462 and it seems that its an error related to smack.
If the subject is for that I reviewed this issue for Spark and it seems that its an error related to smack.

Smack checks if there is a muc#roominfo_subject element but not, if that element has any values.
This can cause NoSuchElementException in RoomInfo.java.



 Comments   
Comment by Tim Jentz [ 15/Dec/11 ]

This patch should solve this problem by checking if the subject has any values.

Comment by Tim Jentz [ 19/Dec/11 ]

Since i think the description field could cause the same problem like the subject field, i updated the patch to check the description values too.

Comment by Robin Collier [ 21/Dec/11 ]

Added modified version of patch. The patch returned "n/a" instead of "", which was what was being returned before. This has the potential for breaking existing code since any check for an empty string would fail.

Generated at Fri Mar 29 10:42:24 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100248-rev:6a03a54452e975225e04dfda06fdac6fd9e95b00.