Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2005 23:41:00 +0300
From:      Dan Cojocar <dan.cojocar@gmail.com>
To:        freebsd-java@freebsd.org
Subject:   Re: jdk1.5.0p2 nio NPE
Message-ID:  <b37cb097050923134149b9562b@mail.gmail.com>
In-Reply-To: <20050922201315.GC56570@misty.eyesbeyond.com>
References:  <b37cb097050921073468799728@mail.gmail.com> <20050922201315.GC56570@misty.eyesbeyond.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/22/05, Greg Lewis <glewis@eyesbeyond.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b37cb097050923134149b9562b>