Permalink
Browse files

Useless condition in parseQuery

AbstractJdbc2ResultSet#parseQuery contains a condition that is always
true.
  • Loading branch information...
marschall committed Dec 13, 2015
1 parent 66a5876 commit dd229d5f163f0284a53b01f36d6bed74a7406e7c
Showing with 5 additions and 14 deletions.
  1. +5 −14 org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
@@ -1775,23 +1775,14 @@ private void parseQuery()
while ( !tableFound && !tablesChecked && st.hasMoreTokens() )
{
name = st.nextToken();
if ( !tableFound )
if ("from".equalsIgnoreCase(name))
{
if ("from".equalsIgnoreCase(name))
{
tableName = st.nextToken();
if ("only".equalsIgnoreCase(tableName)) {
tableName = st.nextToken();
if ("only".equalsIgnoreCase(tableName)) {
tableName = st.nextToken();
onlyTable = "ONLY ";
}
tableFound = true;
onlyTable = "ONLY ";
}
}
else
{
tablesChecked = true;
// if the very next token is , then there are multiple tables
singleTable = !name.equalsIgnoreCase(",");
tableFound = true;
}
}
}

0 comments on commit dd229d5

Please sign in to comment.