Try to fix recent bug in IITCm

This commit is contained in:
fkloft 2014-01-14 08:55:32 +01:00
parent 05cd342051
commit 9113c09fa7

View File

@ -142,12 +142,16 @@ public final class Log {
public static boolean log(ConsoleMessage message) {
String msg = message.sourceId();
Matcher matcher = URL_PATTERN.matcher(msg);
if (matcher.matches()) {
msg = "<" + matcher.group(1) + "/" + matcher.group(2) + ">";
if (msg == null || "".equals(msg)) {
msg = "<no source>";
} else {
Matcher matcher = URL_PATTERN.matcher(msg);
if (matcher.matches()) {
msg = "<" + matcher.group(1) + "/" + matcher.group(2) + ">";
}
}
if ("".equals(msg)) msg = "<no source>";
msg += ":" + message.lineNumber() + ": " + message.message();
final Integer priority = CONSOLE_MAPPING.get(message.messageLevel());