mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1738 - Refactor add final, Object.equals, Integer.compare
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user