FreeBSD's jdk1.5 has the same problem as OpenBSD's, discussed in [1].
Kurt Miller said it would be fixed in patchset 3 [2], but it wasn't.
Attached is the patch from [1]. There's a NullPointerException if
Charset.availableCharsets() is called without the patch. Tested on
amd64, -current.
[1]
http://lists.freebsd.org/mailman/htdig/freebsd-java/2005-September/004355.html
[2] http://lists.freebsd.org/pipermail/freebsd-java/2006-February/004963.html
$OpenBSD$
--- j2se/src/share/classes/java/nio/charset/Charset.java.orig Tue May 30 17:20:25 2006
+++ j2se/src/share/classes/java/nio/charset/Charset.java Tue May 30 17:21:04 2006
@@ -490,7 +490,7 @@ public abstract class Charset
private static void put(Iterator i, Map m) {
while (i.hasNext()) {
Charset cs = (Charset)i.next();
- if (!m.containsKey(cs.name()))
+ if (cs!=null&&!m.containsKey(cs.name()))
m.put(cs.name(), cs);
}
}