* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
+ * Modifications Copyright © 2018 IBM
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
SAXParser saxParser = factory.newSAXParser();
InputStream in = new ByteArrayInputStream(s.getBytes());
saxParser.parse(in, handler);
- } catch (ParserConfigurationException | IOException | SAXException e) {
+ } catch (ParserConfigurationException | IOException | SAXException | NumberFormatException e) {
throw new SvcLogicException("Unable to convert XML to properties" + e.getLocalizedMessage(), e);
}
return handler.getProperties();
private Map<String, String> properties = new HashMap<>();
- public Map<String, String> getProperties() {
- return properties;
- }
+ StringBuilder currentName = new StringBuilder();
+ StringBuilder currentValue = new StringBuilder();
public Handler(Set<String> listNameList) {
super();
this.listNameList = new HashSet<>();
}
- StringBuilder currentName = new StringBuilder();
- StringBuilder currentValue = new StringBuilder();
+ public Map<String, String> getProperties() {
+ return properties;
+ }
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes)