Skip to content

Commit 058b972

Browse files
committed
Refactor repeated expression.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1301750 13f79535-47bb-0310-9956-ffa450edef68
1 parent d1ae609 commit 058b972

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public int read() throws IOException {
5454
r = read(singleByte, 0, 1);
5555
}
5656
if (r > 0) {
57-
return singleByte[0] < 0 ? 256 + singleByte[0] : singleByte[0];
57+
final byte b = singleByte[0];
58+
return b < 0 ? 256 + b : b;
5859
}
5960
return -1;
6061
}

0 commit comments

Comments
 (0)