From owner-freebsd-java@FreeBSD.ORG Fri Sep 23 20:41:01 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCD4616A41F for ; Fri, 23 Sep 2005 20:41:01 +0000 (GMT) (envelope-from dan.cojocar@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4528043D45 for ; Fri, 23 Sep 2005 20:41:01 +0000 (GMT) (envelope-from dan.cojocar@gmail.com) Received: by xproxy.gmail.com with SMTP id h32so440299wxd for ; Fri, 23 Sep 2005 13:41:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=H+em2Hk7ZquCF9gaYzRKElYntk6qJaC5Ery+OJVQGygm8Qb6S9897aO3E1wg01VE/bbKSc6r7To7jwd/bpwg1A7ZLhB0acMOdUqLzmNFZwUeeVACC/IEGeG/aArEouub/fR5GkkoxZP1dCh0Kjde8N5VDvcxdDmMl9jmntf6EFM= Received: by 10.70.55.19 with SMTP id d19mr93686wxa; Fri, 23 Sep 2005 13:41:00 -0700 (PDT) Received: by 10.70.56.10 with HTTP; Fri, 23 Sep 2005 13:41:00 -0700 (PDT) Message-ID: Date: Fri, 23 Sep 2005 23:41:00 +0300 From: Dan Cojocar To: freebsd-java@freebsd.org In-Reply-To: <20050922201315.GC56570@misty.eyesbeyond.com> MIME-Version: 1.0 References: <20050922201315.GC56570@misty.eyesbeyond.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: jdk1.5.0p2 nio NPE X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dan Cojocar List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2005 20:41:02 -0000 On 9/22/05, Greg Lewis wrote: > > On Wed, Sep 21, 2005 at 05:34:32PM +0300, Dan Cojocar wrote: > > I just tried the new patchset and i receive the following exception whe= n > i > > want to start Intellij's idea: > > > > java.lang.NullPointerException > > at java.nio.charset.Charset.put(Charset.java:493) > [snip] > > Is this a regression, i.e., did it work with patchset 1? Not knowing > how Intellij works, is it possible to run this under jdb and get some > more information on this (there are two variables on that line which > could cause a NullPointerException). Hello Greg, I didn't noticed this on patchset 1 until now because I didn't have the new eap from intellij, it seems that only with this last eap i get this NPE. Bu= t now i can confirm that patchset 1 is affected too :( But if I modify line 493 in Charset.java to check if cs is not null, intellij's idea is working properly. --- Charset.java.orig Fri Sep 23 23:29:08 2005 +++ Charset.java Fri Sep 23 23:23:43 2005 @@ -490,7 +490,7 @@ private static void put(Iterator i, Map m) { while (i.hasNext()) { Charset cs =3D (Charset)i.next(); - if (!m.containsKey(cs.name())) + if (cs!=3Dnull&&!m.containsKey(cs.name())) m.put(cs.name(), cs); } } Thanks, Dan