mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Do net set a default language when parsing Message stanzas
the fallback is (usually) not needed, as most XMPP XML streams have a default xml:lang set (See RFC 6120 § 4.7.4.).
This commit is contained in:
parent
93c2b2be26
commit
cd5daa6fd7
1 changed files with 1 additions and 10 deletions
|
@ -231,16 +231,7 @@ public class PacketParserUtils {
|
|||
message.setType(Message.Type.fromString(typeString));
|
||||
}
|
||||
String language = getLanguageAttribute(parser);
|
||||
|
||||
// determine message's default language
|
||||
String defaultLanguage;
|
||||
if (language != null && !"".equals(language.trim())) {
|
||||
message.setLanguage(language);
|
||||
defaultLanguage = language;
|
||||
}
|
||||
else {
|
||||
defaultLanguage = Stanza.getDefaultLanguage();
|
||||
}
|
||||
message.setLanguage(language);
|
||||
|
||||
// Parse sub-elements. We include extra logic to make sure the values
|
||||
// are only read once. This is because it's possible for the names to appear
|
||||
|
|
Loading…
Reference in a new issue