Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
c4fb158d
Commit
c4fb158d
authored
Sep 09, 2021
by
李传峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除不必要error日志
parent
458707da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
Cookie.java
.../src/main/java/com/pcloud/common/utils/cookie/Cookie.java
+6
-14
No files found.
pcloud-common/src/main/java/com/pcloud/common/utils/cookie/Cookie.java
View file @
c4fb158d
...
@@ -145,17 +145,13 @@ public class Cookie {
...
@@ -145,17 +145,13 @@ public class Cookie {
*/
*/
public
static
Map
<
String
,
Object
>
getUserInfo
(
String
userInfo
)
throws
BizException
{
public
static
Map
<
String
,
Object
>
getUserInfo
(
String
userInfo
)
throws
BizException
{
if
(
StringUtil
.
isEmpty
(
userInfo
))
{
if
(
StringUtil
.
isEmpty
(
userInfo
))
{
LOGGER
.
warn
(
"Cookie解析失败:userInfo==NULL"
);
throw
BizException
.
COOKIE_IS_ILLICIT
;
throw
BizException
.
COOKIE_IS_ILLICIT
;
}
}
try
{
try
{
userInfo
=
URLDecoder
.
decode
(
userInfo
,
"UTF-8"
);
userInfo
=
URLDecoder
.
decode
(
userInfo
,
"UTF-8"
);
LOGGER
.
info
(
"Cookie的内容如下:"
+
String
.
valueOf
(
userInfo
));
LOGGER
.
info
(
"Cookie的内容如下:{}"
,
userInfo
);
}
catch
(
UnsupportedEncodingException
e
)
{
LOGGER
.
error
(
"Cookie解析失败:"
+
e
.
getMessage
(),
e
);
throw
BizException
.
COOKIE_IS_ILLICIT
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"Cookie解析失败:
"
+
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"Cookie解析失败:
{}"
,
e
.
getMessage
(),
e
);
throw
BizException
.
COOKIE_IS_ILLICIT
;
throw
BizException
.
COOKIE_IS_ILLICIT
;
}
}
Map
<
String
,
Object
>
userInfos
=
new
HashMap
<>();
Map
<
String
,
Object
>
userInfos
=
new
HashMap
<>();
...
@@ -316,18 +312,14 @@ public class Cookie {
...
@@ -316,18 +312,14 @@ public class Cookie {
* @throws BizException
* @throws BizException
*/
*/
public
static
String
getString
(
String
userInfo
,
String
type
)
throws
BizException
{
public
static
String
getString
(
String
userInfo
,
String
type
)
throws
BizException
{
if
(
StringUtil
.
isEmpty
(
userInfo
))
{
if
(
StringUtil
.
isBlank
(
userInfo
))
{
LOGGER
.
error
(
"Cookie解析失败:userInfo==NULL"
);
throw
BizException
.
COOKIE_IS_ILLICIT
;
throw
BizException
.
COOKIE_IS_ILLICIT
;
}
}
try
{
try
{
userInfo
=
URLDecoder
.
decode
(
userInfo
,
"UTF-8"
);
userInfo
=
URLDecoder
.
decode
(
userInfo
,
"UTF-8"
);
LOGGER
.
info
(
"Cookie的内容如下:"
+
String
.
valueOf
(
userInfo
));
LOGGER
.
info
(
"Cookie的内容如下:{}"
,
userInfo
);
}
catch
(
UnsupportedEncodingException
e
)
{
LOGGER
.
error
(
"Cookie解析失败:"
+
e
.
getMessage
(),
e
);
throw
new
BizException
(
BizException
.
COOKIE_IS_ILLICIT
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"Cookie解析失败:
"
+
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"Cookie解析失败:
{}"
,
e
.
getMessage
(),
e
);
throw
new
BizException
(
BizException
.
COOKIE_IS_ILLICIT
);
throw
new
BizException
(
BizException
.
COOKIE_IS_ILLICIT
);
}
}
String
[]
userInfoArry
=
userInfo
.
split
(
"&"
);
String
[]
userInfoArry
=
userInfo
.
split
(
"&"
);
...
@@ -335,7 +327,7 @@ public class Cookie {
...
@@ -335,7 +327,7 @@ public class Cookie {
if
(
userInfoArry
[
i
].
contains
(
type
))
{
if
(
userInfoArry
[
i
].
contains
(
type
))
{
String
[]
ids
=
userInfoArry
[
i
].
split
(
"="
);
String
[]
ids
=
userInfoArry
[
i
].
split
(
"="
);
String
id
=
ids
[
ids
.
length
-
1
];
String
id
=
ids
[
ids
.
length
-
1
];
return
StringUtil
.
is
Empty
(
id
)
||
"undefined"
.
equalsIgnoreCase
(
id
)
||
"null"
.
equalsIgnoreCase
(
id
)
||
type
.
equalsIgnoreCase
(
id
)?
null
:
id
;
return
StringUtil
.
is
Blank
(
id
)
||
"undefined"
.
equalsIgnoreCase
(
id
)
||
"null"
.
equalsIgnoreCase
(
id
)
||
type
.
equalsIgnoreCase
(
id
)?
null
:
id
;
}
}
}
}
return
null
;
return
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment