From: rob stone <floriparob@gmail.com>
To: javadesigner <javadesigner@yahoo.com>
To: List <pgsql-jdbc@postgresql.org>
Subject: Re: getTypeMap() returns null - bug?
Date: Tue, 12 May 2020 14:10:39 +1000
Message-ID: <c242e29538102940cdf6f398a6666dd7ff033e83.camel@gmail.com> (raw)
In-Reply-To: <f44eec01-dce5-7a29-388b-a3994d29e1df@yahoo.com>
References: <af26d6b5-6f61-7e21-4972-2c719357bef6.ref@yahoo.com>
<af26d6b5-6f61-7e21-4972-2c719357bef6@yahoo.com>
<e6a8e0de373300df2d42211a1fc1d94b7693ad02.camel@gmail.com>
<f44eec01-dce5-7a29-388b-a3994d29e1df@yahoo.com>
On Mon, 2020-05-11 at 02:28 -0400, javadesigner wrote:
> empty is not the same as null in java. this is a java specific
> discussion btw.
>
Vraimente.
java.util.Map map = con.getTypeMap();
So, the variable "map" is now an empty map object. Highly likely it
contains hex zeroes. It could contain the string "empty" but that does
not sound reasonable. Maybe there is no memory address and memory is
only allocated with the first "put".
System.out.println("map:"+map);
So, println accesses the memory occupied by the object and assuming it
contains unprintable hex zeroes, it can either display "null", or
convert to printable zeroes or ignore it and display nothing.
What output did you expect from "System.out.println("map:"+map);"??
That is the question.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: floriparob@gmail.com, javadesigner@yahoo.com
Subject: Re: getTypeMap() returns null - bug?
In-Reply-To: <c242e29538102940cdf6f398a6666dd7ff033e83.camel@gmail.com>
References: <af26d6b5-6f61-7e21-4972-2c719357bef6.ref@yahoo.com> <af26d6b5-6f61-7e21-4972-2c719357bef6@yahoo.com> <e6a8e0de373300df2d42211a1fc1d94b7693ad02.camel@gmail.com> <f44eec01-dce5-7a29-388b-a3994d29e1df@yahoo.com> <c242e29538102940cdf6f398a6666dd7ff033e83.camel@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox