Commit c4fb158d by 李传峰

移除不必要error日志

parent 458707da
......@@ -145,17 +145,13 @@ public class Cookie {
*/
public static Map<String, Object> getUserInfo(String userInfo) throws BizException {
if (StringUtil.isEmpty(userInfo)) {
LOGGER.warn("Cookie解析失败:userInfo==NULL");
throw BizException.COOKIE_IS_ILLICIT;
}
try {
userInfo = URLDecoder.decode(userInfo, "UTF-8");
LOGGER.info("Cookie的内容如下:" + String.valueOf(userInfo));
} catch (UnsupportedEncodingException e) {
LOGGER.error("Cookie解析失败:" + e.getMessage(), e);
throw BizException.COOKIE_IS_ILLICIT;
LOGGER.info("Cookie的内容如下:{}" , userInfo);
} catch (Exception e) {
LOGGER.error("Cookie解析失败:" + e.getMessage(), e);
LOGGER.error("Cookie解析失败:{}" , e.getMessage(), e);
throw BizException.COOKIE_IS_ILLICIT;
}
Map<String, Object> userInfos = new HashMap<>();
......@@ -316,18 +312,14 @@ public class Cookie {
* @throws BizException
*/
public static String getString(String userInfo, String type) throws BizException {
if (StringUtil.isEmpty(userInfo)) {
LOGGER.error("Cookie解析失败:userInfo==NULL");
if (StringUtil.isBlank(userInfo)) {
throw BizException.COOKIE_IS_ILLICIT;
}
try {
userInfo = URLDecoder.decode(userInfo, "UTF-8");
LOGGER.info("Cookie的内容如下:" + String.valueOf(userInfo));
} catch (UnsupportedEncodingException e) {
LOGGER.error("Cookie解析失败:" + e.getMessage(), e);
throw new BizException(BizException.COOKIE_IS_ILLICIT);
LOGGER.info("Cookie的内容如下:{}", userInfo);
} catch (Exception e) {
LOGGER.error("Cookie解析失败:" + e.getMessage(), e);
LOGGER.error("Cookie解析失败:{}" , e.getMessage(), e);
throw new BizException(BizException.COOKIE_IS_ILLICIT);
}
String[] userInfoArry = userInfo.split("&");
......@@ -335,7 +327,7 @@ public class Cookie {
if (userInfoArry[i].contains(type)) {
String[] ids = userInfoArry[i].split("=");
String id = ids[ids.length - 1];
return StringUtil.isEmpty(id) || "undefined".equalsIgnoreCase(id) || "null".equalsIgnoreCase(id) || type.equalsIgnoreCase(id)? null : id;
return StringUtil.isBlank(id) || "undefined".equalsIgnoreCase(id) || "null".equalsIgnoreCase(id) || type.equalsIgnoreCase(id)? null : id;
}
}
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment