Skip to content

Commit

Permalink
refactor: Remove pgTypeName null check
Browse files Browse the repository at this point in the history
There is a null check for the pgTypeName parameter at the end of
TypeInfoCache.getSQLType(String). However at the start of this method
pgTypeName.endsWith("[]") is called. pgTypeName is never assigned. If
follows that pgTypeName can never be null at the end of the method.

closes #525
  • Loading branch information
marschall authored and vlsi committed Mar 2, 2016
1 parent 74b4972 commit 462928b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java
Expand Up @@ -252,9 +252,7 @@ public synchronized int getSQLType(String pgTypeName) throws SQLException {
}
rs.close();

if (pgTypeName != null) {
_pgNameToSQLType.put(pgTypeName, type);
}
_pgNameToSQLType.put(pgTypeName, type);
return type;
}

Expand Down

0 comments on commit 462928b

Please sign in to comment.