#1738 - Refactor add final, Object.equals, Integer.compare

This commit is contained in:
rob bygrave
2019-06-29 00:23:12 +12:00
parent 8bfae9deef
commit 7fa5e2aa8c
52 changed files with 102 additions and 120 deletions
@@ -55,7 +55,7 @@ class DRawSqlParser {
private Sql parse() {
parseSqlFindKeywords(true);
parseSqlFindKeywords();
whereExprPos = findWhereExprPosition();
havingExprPos = findHavingExprPosition();
@@ -165,7 +165,7 @@ class DRawSqlParser {
}
}
private void parseSqlFindKeywords(boolean allKeywords) {
private void parseSqlFindKeywords() {
selectPos = textParser.findWordLower("select");
if (selectPos == -1) {
@@ -184,10 +184,6 @@ class DRawSqlParser {
throw new RuntimeException(msg + sql);
}
if (!allKeywords) {
return;
}
wherePos = textParser.findWordLower("where");
if (wherePos == -1) {
groupByPos = textParser.findWordLower("group", fromPos + 5);
@@ -11,6 +11,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* Internal service API for Raw Sql.
@@ -432,8 +433,8 @@ public interface SpiRawSql extends RawSql {
Column that = (Column) o;
if (indexPos != that.indexPos) return false;
if (!dbColumn.equals(that.dbColumn)) return false;
if (dbAlias != null ? !dbAlias.equals(that.dbAlias) : that.dbAlias != null) return false;
return propertyName != null ? propertyName.equals(that.propertyName) : that.propertyName == null;
if (!Objects.equals(dbAlias, that.dbAlias)) return false;
return Objects.equals(propertyName, that.propertyName);
}
@Override