- private static Chain parseXmlFile(File xmlFile) {
- Serializer serializer = new Persister();
- logger.debug(String.format("Reading %s...", xmlFile.getPath()));
- return serializer.read(Chain.class, xmlFile);
+ private static Chain parseConfigurationFile(File configurationFile) {
+ try {
+ return objectMapper.readValue(configurationFile, Chain.class);
+ } catch (JsonParseException jpe1) {
+ logger.warn(String.format("Could not parse %s.", configurationFile), jpe1);
+ } catch (JsonMappingException jme1) {
+ logger.warn(String.format("Could not parse %s.", configurationFile), jme1);
+ } catch (IOException ioe1) {
+ logger.info(String.format("Could not read %s.", configurationFile));
+ }
+ return null;