1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

improve Message parser robustness and I18N for Message bodies (fixes SMACK-207 and SMACK-307)

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11824 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Henning Staib 2010-08-15 15:13:05 +00:00 committed by henning
parent 7e01c66374
commit cb5310c984
4 changed files with 538 additions and 88 deletions

View file

@ -416,18 +416,15 @@ public abstract class Packet {
return this.xmlns;
}
protected static String parseXMLLang(String language) {
if (language == null || "".equals(language)) {
language = DEFAULT_LANGUAGE;
}
return language;
}
protected static String getDefaultLanguage() {
/**
* Returns the default language used for all messages containing localized content.
*
* @return the default language
*/
public static String getDefaultLanguage() {
return DEFAULT_LANGUAGE;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;