Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
tool
/
xxl-job
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a877d9ad
authored
Nov 16, 2024
by
许雪里
Committed by
GitHub
Nov 16, 2024
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #3355 from oddityyyy/master
Update JdkSerializeTool.java
2 parents
a58c411e
f7319415
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
xxl-job-core/src/main/java/com/xxl/job/core/util/JdkSerializeTool.java
xxl-job-core/src/main/java/com/xxl/job/core/util/JdkSerializeTool.java
View file @
a877d9a
...
@@ -51,16 +51,18 @@ public class JdkSerializeTool {
...
@@ -51,16 +51,18 @@ public class JdkSerializeTool {
* @return
* @return
*/
*/
public
static
<
T
>
Object
deserialize
(
byte
[]
bytes
,
Class
<
T
>
clazz
)
{
public
static
<
T
>
Object
deserialize
(
byte
[]
bytes
,
Class
<
T
>
clazz
)
{
ObjectInputStream
ois
=
null
;
ByteArrayInputStream
bais
=
null
;
ByteArrayInputStream
bais
=
null
;
try
{
try
{
// 反序列化
// 反序列化
bais
=
new
ByteArrayInputStream
(
bytes
);
bais
=
new
ByteArrayInputStream
(
bytes
);
ObjectInputStream
ois
=
new
ObjectInputStream
(
bais
);
ois
=
new
ObjectInputStream
(
bais
);
return
ois
.
readObject
();
return
ois
.
readObject
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
logger
.
error
(
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
try
{
try
{
ois
.
close
();
bais
.
close
();
bais
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
logger
.
error
(
e
.
getMessage
(),
e
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment