fixed pull #1266 , optimizer code

This commit is contained in:
agapple
2018-12-11 13:40:32 +08:00
parent bd5110b951
commit 277a273ebc
13 changed files with 464 additions and 629 deletions

View File

@@ -7,17 +7,10 @@ import org.apache.oro.text.regex.Pattern;
import org.apache.oro.text.regex.PatternCompiler;
import org.apache.oro.text.regex.Perl5Compiler;
import com.alibaba.otter.canal.filter.exception.CanalFilterException;
import com.google.common.base.Function;
import com.google.common.collect.MapMaker;
import com.google.common.collect.MigrateMap;
/**
* 提供{@linkplain Pattern}的lazy get处理
*
* @author jianghang 2013-1-22 下午09:36:44
* @version 1.0.0
*/
public class PatternUtils {
@SuppressWarnings("deprecation")
@@ -32,7 +25,7 @@ public class PatternUtils {
| Perl5Compiler.READ_ONLY_MASK
| Perl5Compiler.SINGLELINE_MASK);
} catch (MalformedPatternException e) {
throw new CanalFilterException(e);
throw new RuntimeException(e);
}
}
});

View File

@@ -129,4 +129,5 @@ public class AviaterRegexFilter implements CanalEventFilter<String> {
public String toString() {
return pattern;
}
}

View File

@@ -12,7 +12,7 @@ import com.googlecode.aviator.runtime.type.AviatorObject;
/**
* 提供aviator regex的代码扩展
*
*
* @author jianghang 2012-7-23 上午10:29:23
*/
public class RegexFunction extends AbstractFunction {