REM:
1. 格式化代码,修正部分代码检查警告
This commit is contained in:
HuangXin 2021-01-25 14:44:11 +08:00
parent a40a7d7f7c
commit a57f441a07
2 changed files with 37 additions and 39 deletions

View File

@ -32,6 +32,14 @@ import java.util.List;
@Component @Component
@Slf4j @Slf4j
public class HuaWeiAbilityImpl implements DisposeAbility { public class HuaWeiAbilityImpl implements DisposeAbility {
/**
* The constant OBJECT_MAPPER.
*/
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
/**
* The Restful interface.
*/
private final HuaWeiInterface restfulInterface = new HuaWeiInterface();
/** /**
* The Timer cnt. * The Timer cnt.
*/ */
@ -40,16 +48,6 @@ public class HuaWeiAbilityImpl implements DisposeAbility {
* The Device link status. * The Device link status.
*/ */
private boolean deviceLinkStatus = false; private boolean deviceLinkStatus = false;
/**
* The Restful interface.
*/
private final HuaWeiInterface restfulInterface = new HuaWeiInterface();
/**
* The constant OBJECT_MAPPER.
*/
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
/** /**
* The Url root path. * The Url root path.
*/ */
@ -147,7 +145,8 @@ public class HuaWeiAbilityImpl implements DisposeAbility {
} }
if (resp != ErrorCode.ERR_OK) { if (resp != ErrorCode.ERR_OK) {
log.error("----Error HuaWei start clean {} return error: {}, {}", disposeObject, resp.getCode(), resp.getMsg()); log.error("----Error HuaWei start clean {} return error: {}, {}", disposeObject, resp.getCode(),
resp.getMsg());
return new MulReturnType<>(ErrorCode.ERR_HUAWEI_ERROR, null); return new MulReturnType<>(ErrorCode.ERR_HUAWEI_ERROR, null);
} }
@ -313,8 +312,7 @@ public class HuaWeiAbilityImpl implements DisposeAbility {
if (response.getStatus() == HttpServletResponse.SC_OK) { if (response.getStatus() == HttpServletResponse.SC_OK) {
deviceLinkStatus = true; deviceLinkStatus = true;
} }
} catch ( } catch (Exception ex) {
Exception ex) {
log.error(ex.getMessage()); log.error(ex.getMessage());
} }

View File

@ -23,6 +23,15 @@ import java.util.Map;
*/ */
@Slf4j @Slf4j
public class RestfulInterface { public class RestfulInterface {
/**
* The constant OBJECT_MAPPER.
*/
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
/**
* The constant timeOutValue.
*/
private static int timeOutValue = 1000;
/** /**
* Instantiates a new Restful interface. * Instantiates a new Restful interface.
*/ */
@ -30,15 +39,6 @@ public class RestfulInterface {
throw new AssertionError("Instantiating utility class."); throw new AssertionError("Instantiating utility class.");
} }
/**
* The constant timeOutValue.
*/
private static int timeOutValue = 1000;
/**
* The constant OBJECT_MAPPER.
*/
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
/** /**
* Init env. * Init env.
* *