Baunsgaard commented on code in PR #2019:
URL: https://github.com/apache/systemds/pull/2019#discussion_r1567338942
##########
src/main/java/org/apache/sysds/runtime/util/DoubleBufferingOutputStream.java:
##########
@@ -43,42 +42,49 @@ public DoubleBufferingOutputStream(OutputStream out, int
num, int size) {
super(out);
if(size <= 0)
throw new IllegalArgumentException("Buffer size <= 0.");
- if( size%8 != 0 )
+ if(size % 8 != 0)
throw new IllegalArgumentException("Buffer size not a
multiple of 8.");
_buff = new byte[num][size];
_locks = new Future<?>[num];
- for(int i=0; i<num; i++)
+ for(int i = 0; i < num; i++) // fill the futures to avoid null
pointers.
_locks[i] = ConcurrentUtils.constantFuture(null);
}
@Override
public void write(int b) throws IOException {
- throw new IOException("Not supported");
+ throw new IOException("Not supported");
}
@Override
- public void write(byte[] b, int off, int len)
- throws IOException
- {
+ public void write(byte[] b, int off, int len) throws IOException {
Review Comment:
The problem is this method,
The rest of the PR is mainly just formatting and docs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]