1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

[core] Align behavior of getParserFor(InputStream) and getParserFor(Reader)

Reported-by: Ingo Bauersachs <ingo@jitsi.org>
This commit is contained in:
Florian Schmaus 2021-11-30 10:49:55 +01:00
parent cad63bc107
commit 11cc2d8d77
3 changed files with 3 additions and 6 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2003-2007 Jive Software, 2019 Florian Schmaus.
* Copyright 2003-2007 Jive Software, 2019-2021 Florian Schmaus.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -76,9 +76,9 @@ public class PacketParserUtils {
return getParserFor(new StringReader(stanza));
}
public static XmlPullParser getParserFor(InputStream inputStream) throws XmlPullParserException {
public static XmlPullParser getParserFor(InputStream inputStream) throws XmlPullParserException, IOException {
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
return SmackXmlParser.newXmlParser(inputStreamReader);
return getParserFor(inputStreamReader);
}
public static XmlPullParser getParserFor(Reader reader) throws XmlPullParserException, IOException {