Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Egeberg Hansen committed May 14, 2024
1 parent e6200df commit 3ada173
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
Binary file modified build/distributions/cobol-check-0.2.10.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,22 @@ private void getProcessOut(Process proc) {
try {
synchronized (lock) {
numberOfCharsRead = reader.read(tempReadBuffer, writeOffset, maxBytesToReadFromCobolCheck);
System.out.println("ProcessOutputWriter: numberOfCharsRead = " + numberOfCharsRead);
if(numberOfCharsRead == maxBytesToReadFromCobolCheck) {
int largeMaxBytesToReadFromCobolCheck = 100000;
char largeTempReadBuffer[] = new char[maxBytesToReadFromCobolCheck + largeMaxBytesToReadFromCobolCheck];
System.arraycopy(tempReadBuffer, 0, largeTempReadBuffer, 0, tempReadBuffer.length);
int largeNumberOfCharsRead = reader.read(largeTempReadBuffer, tempReadBuffer.length, largeMaxBytesToReadFromCobolCheck);
System.out.println("ProcessOutputWriter: largeNumberOfCharsRead = " + largeNumberOfCharsRead);
numberOfCharsRead += largeNumberOfCharsRead;
cobolCheckOutput = new char[numberOfCharsRead];
System.arraycopy(largeTempReadBuffer, 0, cobolCheckOutput, 0, numberOfCharsRead);
}
else {
cobolCheckOutput = new char[numberOfCharsRead];
System.arraycopy(tempReadBuffer, 0, cobolCheckOutput, 0, numberOfCharsRead);
if(numberOfCharsRead > 0) {
if(numberOfCharsRead == maxBytesToReadFromCobolCheck) {
int largeMaxBytesToReadFromCobolCheck = 100000;
char largeTempReadBuffer[] = new char[maxBytesToReadFromCobolCheck + largeMaxBytesToReadFromCobolCheck];
System.arraycopy(tempReadBuffer, 0, largeTempReadBuffer, 0, tempReadBuffer.length);
int largeNumberOfCharsRead = reader.read(largeTempReadBuffer, tempReadBuffer.length, largeMaxBytesToReadFromCobolCheck);
numberOfCharsRead += largeNumberOfCharsRead;
cobolCheckOutput = new char[numberOfCharsRead];
System.arraycopy(largeTempReadBuffer, 0, cobolCheckOutput, 0, numberOfCharsRead);
}
else {
cobolCheckOutput = new char[numberOfCharsRead];
System.arraycopy(tempReadBuffer, 0, cobolCheckOutput, 0, numberOfCharsRead);
}
}
reader.close();
System.out.println("ProcessOutputWriter: numberOfCharsRead = " + numberOfCharsRead);
}
} catch (IOException e) {
Log.warn(Messages.get("WRN007"));
Expand Down
Binary file modified vs-code-extension/Cobol-check/bin/cobol-check-0.2.10.jar
Binary file not shown.

0 comments on commit 3ada173

Please sign in to comment.