Re: getTypeMap() returns null - bug?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Dave Cramer <davecramer(at)postgres(dot)rocks>
Cc: rob stone <floriparob(at)gmail(dot)com>, javadesigner <javadesigner(at)yahoo(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: getTypeMap() returns null - bug?
Date: 2020-05-11 14:14:13
Message-ID: CAKFQuwab=smfcQy7zN1ytVBKXcMb3NN7SgKRbpeysNCgRUvp8A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Monday, May 11, 2020, Dave Cramer <davecramer(at)postgres(dot)rocks> wrote:

>
>
> On Mon, 11 May 2020 at 10:04, David G. Johnston <
> david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
>> On Monday, May 11, 2020, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
>> wrote:
>>
>>>
>>>>> Yes, it is a bug. It should return an empty typemap
>>>>
>>>
>>>
>>> Given the code in getObject and lack of use anywhere else I’d say it
>>> should return the unsupported exception. Not reason to delay the error
>>> until later.
>>>
>>
>> Actually...I’ll srick with my original thought that making it an
>> exception now is not desirable as it could break working code (though not
>> likely...) for no real gain.
>>
>> David J.
>>
>
> Using it will throw an exception later in getObject()
>

I know...IMO that whole block in getObject should be tossed, the protected
variable removed, and the getter and setter made to throw exceptions.
Having the exception happen in getObject is what i’m opposed to but accept
as a matter of backward compatibility.

David J.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message rob stone 2020-05-12 04:10:39 Re: getTypeMap() returns null - bug?
Previous Message Dave Cramer 2020-05-11 14:05:33 Re: getTypeMap() returns null - bug?