Skip to content

Commit

Permalink
No need to initialize to default value.
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 21, 2020
1 parent d329bfe commit 41fb9ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,10 @@ private ByteArrayOutputStream serialize(Object target) throws Exception {
* Do deserialization
*/
private Object deserialize(ByteArrayOutputStream baos) throws Exception {
Object result = null;
ByteArrayInputStream bais =
new ByteArrayInputStream(baos.toByteArray());
ObjectInputStream ois = new ObjectInputStream(bais);
result = ois.readObject();
Object result = ois.readObject();
bais.close();

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ static public HttpServletRequest createValidHttpServletRequest(
sbRequestData.append(strFileName);
}

byte[] requestData = null;
requestData = sbRequestData.toString().getBytes();
final byte[] requestData = sbRequestData.toString().getBytes();

return new MockHttpServletRequest(
requestData,
Expand Down

0 comments on commit 41fb9ee

Please sign in to comment.