Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
areyouok committed Oct 14, 2023
1 parent 2c84712 commit 77bf5f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ public byte[] apply(Object value) {
StringBuilder sb = new StringBuilder("Java Encode error. ");
sb.append("msg=").append(e.getMessage());
throw new CacheEncodeException(sb.toString(), e);
}finally {
if(bos != null)
} finally {
if (bos != null) {
bosPool.returnObject(bos);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ public byte[] apply(Object value) {
StringBuilder sb = new StringBuilder("Kryo Encode error. ");
sb.append("msg=").append(e.getMessage());
throw new CacheEncodeException(sb.toString(), e);
}finally {
if(kryoCache != null)
} finally {
if (kryoCache != null) {
kryoCacheObjectPool.returnObject(kryoCache);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ public byte[] apply(Object value) {
sb.append("msg=").append(e.getMessage());
throw new CacheEncodeException(sb.toString(), e);
} finally {
if(kryoCache != null)
if (kryoCache != null) {
kryoCacheObjectPool.returnObject(kryoCache);
}
}
}

Expand Down

0 comments on commit 77bf5f5

Please sign in to comment.