1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Use Locale.US in XMPPError.Type ↔ String conversion

Fixes SMACK-719
This commit is contained in:
Florian Schmaus 2016-04-12 15:03:23 +02:00
parent 8235e8417d
commit 58d9f4e749

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smack.packet;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Logger;
@ -240,13 +241,11 @@ public class XMPPError extends AbstractError {
@Override
public String toString() {
// Locale.US not required, since Type consists only of ASCII chars
return name().toLowerCase();
return name().toLowerCase(Locale.US);
}
public static Type fromString(String string) {
// Locale.US not required, since Type consists only of ASCII chars
string = string.toUpperCase();
string = string.toUpperCase(Locale.US);
return Type.valueOf(string);
}
}