From 99ba09966e0108f1586e84dae8ab67993d1ad1fd Mon Sep 17 00:00:00 2001 From: chenlinghy Date: Sat, 1 May 2021 16:45:54 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E8=A7=A3=E5=86=B3checkstyle?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E9=97=AE=E9=A2=98=202.=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8D=8E=E4=B8=BA=E9=98=B2=E7=81=AB=E5=A2=99=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java | 6 +++++- .../dispose/protocol/HuaWeiFireWallInterface.java | 2 +- src/test/java/com/dispose/test/common/HttpBodyXmlTest.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java b/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java index 95e609cc..469f3565 100644 --- a/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java +++ b/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java @@ -13,6 +13,7 @@ import com.dispose.pojo.po.MulReturnType; import com.dispose.pojo.vo.DeviceFirewareInfo; import com.dispose.security.arithmetic.CryptoHelper; import com.huaweifirewall.dispose.common.HuaWeiFireWallCreatePolicyReq; +import com.huaweifirewall.dispose.common.SourceIp; import com.huaweifirewall.dispose.protocol.HuaWeiFireWallInterface; import inet.ipaddr.IPAddress; import inet.ipaddr.IPAddressString; @@ -118,8 +119,11 @@ public class HuaWeiFireWallAbilityImpl implements DisposeAbility { return new MulReturnType<>(ErrorCode.ERR_LOGOUT, ""); } + SourceIp sourceIp = new SourceIp(); + sourceIp.setAddressIpv4(disposeObj); + HuaWeiFireWallCreatePolicyReq policyReq = HuaWeiFireWallCreatePolicyReq.builder() - .sourceIp(disposeObj).action(false).build(); + .sourceIp(sourceIp).action(false).build(); try { log.info("++++Begging HuaWei FireWall Start Cleanup Task: {}", disposeObject); diff --git a/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java b/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java index 6a5cb973..196bf1fd 100644 --- a/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java +++ b/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java @@ -118,7 +118,7 @@ public class HuaWeiFireWallInterface { /** * 将string类型的XML转换成对象 */ - public static Object convertXmlStrToObject(Class clazz, String xmlStr) { + public static Object convertXmlStrToObject(Class clazz, String xmlStr) { Object xmlObject = null; try { JAXBContext context = JAXBContext.newInstance(clazz); diff --git a/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java b/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java index 1608ac81..06247028 100644 --- a/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java +++ b/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java @@ -92,7 +92,7 @@ public class HttpBodyXmlTest { /** * 将string类型的XML转换成对象 */ - public static Object convertXmlStrToObject(Class clazz, String xmlStr) { + public static Object convertXmlStrToObject(Class clazz, String xmlStr) { Object xmlObject = null; try { JAXBContext context = JAXBContext.newInstance(clazz);