ToBoolean method return correct Boolean values as per JDBC spec

Поиск
Список
Период
Сортировка
От Kim Ho
Тема ToBoolean method return correct Boolean values as per JDBC spec
Дата
Msg-id 1055959376.13891.57.camel@topanga.toronto.redhat.com
обсуждение исходный текст
Список pgsql-patches
Problem:
- The toBoolean() method treats all input strings that start with T, t,
or 1 as true. For instance, "The sun is not a star." is evaluated as
true...
However, booleans are only supposed to be true if the
value of the input string is equalsignorecase "True".
I've left in a single character string "1" and
a single character string "t" (or "T") for backwards compatibility.

new Boolean("this is not a boolean") produces a Boolean object that
represents false.

However, when you insert 'this is not a boolean' into a CHAR column and
use getBoolean to extract it, it returns true.

Fix:
 - Different check in toBoolean()

Cheers,

Kim

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: Runtime.SGML diff ... please expedite!
Следующее
От: Rod Taylor
Дата:
Сообщение: System Catalog Foreign Keys (linked)