FileName is optional in StacktraceElement

This commit is contained in:
Simon Willnauer 2015-06-30 15:51:48 +02:00
parent 0ac8c1bc55
commit bbaf4710cb
1 changed files with 2 additions and 2 deletions

View File

@ -366,7 +366,7 @@ public class ElasticsearchException extends RuntimeException implements ToXConte
StackTraceElement[] stackTrace = new StackTraceElement[stackTraceElements];
for (int i = 0; i < stackTraceElements; i++) {
final String declaringClasss = in.readString();
final String fileName = in.readString();
final String fileName = in.readOptionalString();
final String methodName = in.readString();
final int lineNumber = in.readVInt();
stackTrace[i] = new StackTraceElement(declaringClasss,methodName, fileName, lineNumber);
@ -388,7 +388,7 @@ public class ElasticsearchException extends RuntimeException implements ToXConte
out.writeVInt(stackTrace.length);
for (StackTraceElement element : stackTrace) {
out.writeString(element.getClassName());
out.writeString(element.getFileName());
out.writeOptionalString(element.getFileName());
out.writeString(element.getMethodName());
out.writeVInt(element.getLineNumber());
}