Commit d425e953 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

these fields are actually private

parent a475374c
......@@ -16,10 +16,10 @@ import java.io.PrintStream;
* @author Gabor Jenei
*/
public class ConsoleErrorHandler implements ErrorHandler {
protected PrintStream errorStream;
protected PrintStream warningStream;
protected PrintStream informationStream;
protected StringBuilder collectedMessage;
private PrintStream errorStream;
private PrintStream warningStream;
private PrintStream informationStream;
private StringBuilder collectedMessage;
/**
* This constructor sets {@link System#err} for error messages and
......@@ -83,7 +83,8 @@ public class ConsoleErrorHandler implements ErrorHandler {
@Override
public void writeMessageToLog() {
errorStream.println(collectedMessage.toString());
collectedMessage = new StringBuilder();
collectedMessage.setLength(0);
collectedMessage.trimToSize();
}
}
......@@ -19,7 +19,7 @@ import org.eclipse.titan.common.logging.ErrorReporter;
* @author Gabor Jenei
*/
public class GUIErrorHandler implements ErrorHandler {
protected StringBuilder collectedMessage;
private StringBuilder collectedMessage;
/**
* Constructor
......@@ -90,7 +90,8 @@ public class GUIErrorHandler implements ErrorHandler {
public void writeMessageToLog() {
if (collectedMessage.length() != 0) {
ErrorReporter.logError(collectedMessage.toString());
collectedMessage = new StringBuilder();
collectedMessage.setLength(0);
collectedMessage.trimToSize();
ErrorMessage.show("Error log", "Various errors happened! For details see the error log.",MessageDialog.ERROR);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment