From 95b4f4645fe544c8f11651d7aa78381b24fc3769 Mon Sep 17 00:00:00 2001 From: GuangrongFu Date: Mon, 24 Aug 2020 20:03:30 +0800 Subject: Fixed Some Vulnerability Issues Fixed the fastjson issue Fixed the retrofit issue Change-Id: Ife7dca0f0aeaf09c753615ef870b84867a970c8d Issue-ID: HOLMES-345 Signed-off-by: GuangrongFu --- .../org/onap/holmes/rulemgt/dcae/DcaeConfigurationPollingTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rulemgt/src/test/java/org/onap') diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPollingTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPollingTest.java index 53e60c8..6b640b2 100644 --- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPollingTest.java +++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPollingTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2020 ZTE Corporation. *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package org.onap.holmes.rulemgt.dcae; -import com.alibaba.fastjson.JSONObject; import org.apache.http.HttpResponse; import org.apache.http.StatusLine; import org.apache.http.client.methods.HttpDelete; @@ -31,6 +30,7 @@ import org.junit.runner.RunWith; import org.onap.holmes.common.dcae.DcaeConfigurationQuery; import org.onap.holmes.common.dcae.entity.DcaeConfigurations; import org.onap.holmes.common.dcae.entity.Rule; +import org.onap.holmes.common.utils.GsonUtil; import org.onap.holmes.common.utils.HttpsUtils; import org.onap.holmes.rulemgt.bean.response.RuleQueryListResponse; import org.onap.holmes.rulemgt.bean.response.RuleResult4API; @@ -82,7 +82,7 @@ public class DcaeConfigurationPollingTest { expect(HttpsUtils.getConditionalHttpsClient(30000)).andReturn(clientMock); expect(HttpsUtils.get(anyObject(HttpGet.class), anyObject(HashMap.class), anyObject(CloseableHttpClient.class))) .andReturn(httpResponseMock); - expect(HttpsUtils.extractResponseEntity(httpResponseMock)).andReturn(JSONObject.toJSONString(ruleQueryListResponse)); + expect(HttpsUtils.extractResponseEntity(httpResponseMock)).andReturn(GsonUtil.beanToJson(ruleQueryListResponse)); clientMock.close(); expectLastCall(); -- cgit 1.2.3-korg