Skip to content

Commit

Permalink
Use stax-api newInstance() instead of newFactory() for Android compat…
Browse files Browse the repository at this point in the history
…ibility.
  • Loading branch information
samimejri committed Feb 15, 2025
1 parent 08eaf07 commit 5d6d8d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private static <T> ChatPromptParseVisitor<T> getFunctionDefinitions(String promp
// </function>

try (InputStream is = new ByteArrayInputStream(prompt.getBytes(StandardCharsets.UTF_8))) {
XMLInputFactory factory = XMLInputFactory.newFactory();
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLEventReader reader = factory.createXMLEventReader(is);
FunctionDefinition functionDefinition = null;
Map<String, String> parameters = new HashMap<>();
Expand Down

0 comments on commit 5d6d8d0

Please sign in to comment.