Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYMFm-0001hM-F9 for pgsql-jdbc@arkaria.postgresql.org; Tue, 12 May 2020 04:10:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYMFk-00055D-9O for pgsql-jdbc@arkaria.postgresql.org; Tue, 12 May 2020 04:10:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYMFk-00054p-3e for pgsql-jdbc@lists.postgresql.org; Tue, 12 May 2020 04:10:48 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYMFh-0007eB-Uo for pgsql-jdbc@postgresql.org; Tue, 12 May 2020 04:10:47 +0000 Received: by mail-pj1-x1036.google.com with SMTP id a5so8851604pjh.2 for ; Mon, 11 May 2020 21:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=D40s7UuG8JCsU1vvis0cRxPjGHapNAbI+86wG5nNt8E=; b=uzlLjzWIBUKOwmcW/4McjWW+1Ttj+qpLh9jvGchNff54Ad8UljBJcLpCu5ktge3a54 +CbTNsXkV5m2iNn0p2m/tMEy7Pm5bFK5JGjOfZd17R6sFpNEUkHwmbGaI2MtgKrPQY16 N1KvwHzp3Ux/9qgTv79nBKaXcmjNQ0XXAu5lh9OpMD2Y6NRwyJzgAFFOleTM/qptssX4 tVl4VVUpUiLd0KQ8OdxjC31Po29C4TSyTWJ8xtf4loxr7am3DT4c5yLZIix7a4p/Vb60 AGS+E+RHEhOtqb4WO/dlY2Qun51+UJ2gxSgqEpZJ8fPn756Z4xgdBlJWd7ONo8KOdG3P WQwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=D40s7UuG8JCsU1vvis0cRxPjGHapNAbI+86wG5nNt8E=; b=sqfxTpdZrU7JA/3iPCS9+VxfX2X11qqvubNF7xN1oe8gqNIyB4rGkS51Ujcp2nRXcA DuC4QROY8+0wv3VAVwliBJqesWeQhxLNVryrfj6wV+1qZxdo7zwYlMffH7tNyC4V5N5D /dOzMMfNpPy9EJON//VTrHIaMLTo78/u0wL1npxg08iTng5ULtFuRds1yiBVUGebs7Yn s4eqayk9bl6TYYBYAcXuHDikZVnWLpo/lsa9+p9xdtWeDFnL8nvKesR9aF9VxpB2Nyjd ZLYimTNKVe3AWxnmXVndgmqqtRUnxozrXrX/iCXizuHJt7wxbOsHwqpxZ/VH0ibqDFfY OTag== X-Gm-Message-State: AGi0PuZY0pIgjlqEzWXA1WhBTI0JkMyuzFglUX0yf50ZrZC3Ut+p8DJc BsKvf6ErAk8mOQrCMALdfPg= X-Google-Smtp-Source: APiQypIuk/ubUOYn6dL5AYWOSVcSVmFRtPzNJApHVj+gDUUatZJ0EY+oT4MgkaMRk5Om8DUp68iuIQ== X-Received: by 2002:a17:90a:7486:: with SMTP id p6mr25648639pjk.62.1589256643922; Mon, 11 May 2020 21:10:43 -0700 (PDT) Received: from 192-168-1-101.tpgi.com.au (59-102-62-95.tpgi.com.au. [59.102.62.95]) by smtp.gmail.com with ESMTPSA id v127sm10474783pfv.77.2020.05.11.21.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 21:10:43 -0700 (PDT) Message-ID: Subject: Re: getTypeMap() returns null - bug? From: rob stone To: javadesigner , List Date: Tue, 12 May 2020 14:10:39 +1000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.