At start of method, parameter 'b' is compared with null and NPE is thrown in case of null.
public int read(byte[] b, int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
But later variable is compared is null again
if (b != null) {
b[off + i] = (byte)c;
}
Redundant check could be removed.
public int read(byte[] b, int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
But later variable is compared is null again
if (b != null) {
b[off + i] = (byte)c;
}
Redundant check could be removed.