mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #1192 , NPE test
This commit is contained in:
@@ -135,6 +135,10 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE
|
|||||||
protected void afterDump(ErosaConnection connection) {
|
protected void afterDump(ErosaConnection connection) {
|
||||||
super.afterDump(connection);
|
super.afterDump(connection);
|
||||||
|
|
||||||
|
if (connection == null) {
|
||||||
|
throw new CanalParseException("illegal connection is null");
|
||||||
|
}
|
||||||
|
|
||||||
if (!(connection instanceof MysqlConnection)) {
|
if (!(connection instanceof MysqlConnection)) {
|
||||||
throw new CanalParseException("Unsupported connection type : " + connection.getClass().getSimpleName());
|
throw new CanalParseException("Unsupported connection type : " + connection.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user