Skip to content

Commit c020d67

Browse files
author
Barry Lind
committed
Applied patch for jdbc from Kim Ho at RedHat to more correctly deal with boolean values
Modified Files: jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
1 parent 292048f commit c020d67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (c) 2003, PostgreSQL Global Development Group
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.18 2003/09/13 04:02:15 barry Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.19 2003/09/17 07:00:24 barry Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -797,8 +797,8 @@ public static boolean toBoolean(String s)
797797
{
798798
if (s != null)
799799
{
800-
int c = s.charAt(0);
801-
return ((c == 't') || (c == 'T') || (c == '1'));
800+
s = s.trim();
801+
return (s.equalsIgnoreCase("true") || s.equals("1") || s.equalsIgnoreCase("t"));
802802
}
803803
return false; // SQL NULL
804804
}

0 commit comments

Comments
 (0)