mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +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.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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue