diff options
author | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-09-20 12:43:42 +0530 |
---|---|---|
committer | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-09-20 12:43:42 +0530 |
commit | 72e394582ceeb86e35d2c5cb34b244b38ae5659f (patch) | |
tree | fed5e0395ea15d35e48f77a52677abec726a0a03 /restapi-call-node/provider/src/main | |
parent | ba209b4de55c56e5c427e3389518966f2c896661 (diff) |
Refinements and test additions to XmlParser
Changes includes
1) Added validation for invalid length
2) Added testcases to test length
Change-Id: Iefd56ca470382be139f185fdf84b6c0de0fa99f6
Issue-Id: CCSDK-100
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Diffstat (limited to 'restapi-call-node/provider/src/main')
-rw-r--r-- | restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java index 7ef776da..9aede5b7 100644 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/XmlParser.java @@ -61,7 +61,7 @@ public final class XmlParser { 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(); |