bw backstab worshipper $*
c confuse $*
–More (22/103)–
ca consider acolyte $*
Sep 19, 2013 12:27:27 AM model.TelnetEventProcessor parse*
SEVERE: java.lang.NullPointerException
cc consider citizen $*
public void parse(String string) {
this.string = string;
try {
ifs();
} catch (NullPointerException npe) {
log.severe(npe.toString());
}
}
private void ifs() throws NullPointerException {
log.fine("checking..");
if (string.contains("confusing the hell out of")) {
Pattern pattern = Pattern.compile("[\\w]+(?=\\.)"); //(\w+)\.
Matcher matcher = pattern.matcher(string);
String enemy = null;
GameData data = null;
while (matcher.find()) {
enemy = matcher.group();
}
try {
data = new GameData.Builder().enemy(enemy).build();
} catch (NullPointerException e) {
}
log.fine("new data object\t\t" + data.getEnemy());
setChanged();
notifyObservers(data);
} else if (string.contains("Enter 3-letter city code:")) {
log.fine("found enter city code");
} else {
}
}
try {
data = new GameData.Builder().enemy(enemy).build();
log.fine("new data object\t\t" + data.getEnemy());
setChanged();
notifyObservers(data);
} catch (NullPointerException npe) {
log.severe(npe.toString());
}
log.fine("new data object\t\t" + data.getEnemy());
https://github.com/THUFIR/rainmaker/comm...
but isn't that exception caught??
I'm not sure what triggers this bug.
It only happens when I look at aliases, so something about "press more" or the content of the aliases themselves..?