Skip to content

Commit

Permalink
Merge pull request #23 from pankajjangid05/prod-development
Browse files Browse the repository at this point in the history
Prod development
  • Loading branch information
pankajjangid05 authored May 18, 2023
2 parents bcb1437 + dede29e commit 2e1fa48
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/messagerosa/xml/XMessageParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@
public class XMessageParser {

public static JAXBContext context;
public static Unmarshaller jaxbUnmarshaller;

static {
try {
context = JAXBContext.newInstance(XMessage.class);
jaxbUnmarshaller = context.createUnmarshaller();
} catch (JAXBException e) {
e.printStackTrace();
}
}

public static XMessage parse(InputStream stream) throws JAXBException {
Unmarshaller jaxbUnmarshaller = context.createUnmarshaller();
return (XMessage) jaxbUnmarshaller.unmarshal(stream);
}
}
Expand Down

0 comments on commit 2e1fa48

Please sign in to comment.