Permalink
Browse files

refactor: Remove pgTypeName null check

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 1, 2016
1 parent 74b4972 commit 462928b4c53c29cdc8ceaec541c6fd688f2eac3a
Showing with 1 addition and 3 deletions.
  1. +1 −3 pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java
@@ -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;
}

0 comments on commit 462928b

Please sign in to comment.