public static StacktraceEvent createStacktraceEvent(Transport transport, String remoteUser, String stacktrace, String comment) {
return new StacktraceEvent(transport, remoteUser, stacktrace, comment);
}
public static MessageEvent createMessageEvent(Transport transport, String remoteUser, String comment) {
StacktraceExtractor stacktraceExtractor = new StacktraceExtractor(comment);
if (stacktraceExtractor.containsStacktrace()) {
return createStacktraceEvent(transport, remoteUser,
stacktraceExtractor.getStacktrace(), stacktraceExtractor.getMessageText());
}
return new MessageEvent(transport, remoteUser, comment);
}