mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-16 20:22:05 +01:00
Use Locale.US in XMPPError.Type ↔ String conversion
Fixes SMACK-719
This commit is contained in:
parent
8235e8417d
commit
58d9f4e749
1 changed files with 3 additions and 4 deletions
|
@ -19,6 +19,7 @@ package org.jivesoftware.smack.packet;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
@ -240,13 +241,11 @@ public class XMPPError extends AbstractError {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
// Locale.US not required, since Type consists only of ASCII chars
|
return name().toLowerCase(Locale.US);
|
||||||
return name().toLowerCase();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Type fromString(String string) {
|
public static Type fromString(String string) {
|
||||||
// Locale.US not required, since Type consists only of ASCII chars
|
string = string.toUpperCase(Locale.US);
|
||||||
string = string.toUpperCase();
|
|
||||||
return Type.valueOf(string);
|
return Type.valueOf(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue