Commit 9d17c497 authored by hewei's avatar hewei

issues#54 在注释未采用标准格式添加时(<!--和-->存在其他字符),OptimisticLockerPlugin会出错。

parent edbca726
......@@ -331,8 +331,6 @@ public class LogicalDeletePlugin extends BasePlugin {
selectByPrimaryKey.addAttribute(new Attribute("parameterType", "map"));
context.getCommentGenerator().addComment(selectByPrimaryKey);
sb = new StringBuilder();
sb.append("select ");
......
......@@ -215,7 +215,7 @@ public class FormatTools {
boolean flag = false;
while (elementIterator.hasNext()) {
Element ele = elementIterator.next();
if (ele instanceof TextElement && ((TextElement) ele).getContent().matches("<!--")) {
if (ele instanceof TextElement && ((TextElement) ele).getContent().matches(".*<!--.*")) {
flag = true;
}
......@@ -223,7 +223,7 @@ public class FormatTools {
elementIterator.remove();
}
if (ele instanceof TextElement && ((TextElement) ele).getContent().matches("-->")) {
if (ele instanceof TextElement && ((TextElement) ele).getContent().matches(".*-->.*")) {
flag = false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment