Fix NPE if log message is null (Fixes #3)

This commit is contained in:
games647 2017-06-10 10:05:33 +02:00
parent 8c6718ad81
commit e2089e8166
No known key found for this signature in database
GPG Key ID: BFC68C8708713A88
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,7 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<name>ColorConsole</name> <name>ColorConsole</name>
<version>2.2</version> <version>2.3</version>
<inceptionYear>2016</inceptionYear> <inceptionYear>2016</inceptionYear>
<url>http://dev.bukkit.org/bukkit-plugins/colorconsole/</url> <url>http://dev.bukkit.org/bukkit-plugins/colorconsole/</url>
<description> <description>

View File

@ -48,6 +48,10 @@ public class CommonFormatter {
} }
public boolean shouldIgnore(String message) { public boolean shouldIgnore(String message) {
if (message == null) {
return false;
}
for (String ignore : ignoreMessages) { for (String ignore : ignoreMessages) {
if (message.contains(ignore)) { if (message.contains(ignore)) {
return true; return true;