fixed issue #1192 , NPE test

This commit is contained in:
agapple
2018-11-25 21:17:34 +08:00
parent cbab3fb561
commit 4e9e3f5abe
@@ -135,6 +135,10 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE
protected void afterDump(ErosaConnection connection) {
super.afterDump(connection);
if (connection == null) {
throw new CanalParseException("illegal connection is null");
}
if (!(connection instanceof MysqlConnection)) {
throw new CanalParseException("Unsupported connection type : " + connection.getClass().getSimpleName());
}