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

1) Escape values in form field to prevent error.

2) Check for null value in error type to handle invalid error types.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@5737 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro 2006-10-17 13:15:35 +00:00 committed by derek
parent 43744eb09f
commit d4147e012b
3 changed files with 44 additions and 41 deletions

View file

@ -340,7 +340,9 @@ public class PacketParserUtils {
// Parse the error type.
XMPPError.Type errorType = XMPPError.Type.CANCEL;
try {
errorType = XMPPError.Type.valueOf(type.toUpperCase());
if (type != null) {
errorType = XMPPError.Type.valueOf(type.toUpperCase());
}
}
catch (IllegalArgumentException iae) {
// Print stack trace. We shouldn't be getting an illegal error type.