improve sql wall

This commit is contained in:
yakolee
2014-03-14 13:38:39 +08:00
parent e45c682685
commit 0981b4f83b
7 changed files with 28 additions and 21 deletions
@@ -665,11 +665,7 @@ public abstract class WallProvider {
}
if (visitor.getViolations().size() == 0 && context != null && context.getWarnnings() >= 2) {
if (context.getDeleteNoneConditionWarnnings() > 0) {
violations.add(new IllegalSQLObjectViolation(ErrorCode.NONE_CONDITION, "delete none condition", sql));
} else if (context.getUpdateNoneConditionWarnnings() > 0) {
violations.add(new IllegalSQLObjectViolation(ErrorCode.NONE_CONDITION, "update none condition", sql));
} else if (context.getCommentCount() > 0) {
if (context.getCommentCount() > 0) {
violations.add(new IllegalSQLObjectViolation(ErrorCode.COMMIT_NOT_ALLOW, "comment not allow", sql));
} else if (context.getLikeNumberWarnnings() > 0) {
violations.add(new IllegalSQLObjectViolation(ErrorCode.COMMIT_NOT_ALLOW, "like number", sql));