Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jun 2008 06:45:41 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        freebsd-java@freebsd.org
Subject:   Re: jdk15/javaws on amd64
Message-ID:  <20080620204541.GA73648@server.vk2pj.dyndns.org>
In-Reply-To: <20080422075855.GA8826@server.vk2pj.dyndns.org>
References:  <20080316223054.GA46447@server.vk2pj.dyndns.org> <20080317133144.GA4473@misty.eyesbeyond.com> <20080318061525.GQ44676@server.vk2pj.dyndns.org> <20080319060004.GB19887@misty.eyesbeyond.com> <20080419072928.GJ73016@server.vk2pj.dyndns.org> <20080422075855.GA8826@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--liOOAslEiF7prFVr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2008-Apr-22 17:58:55 +1000, I wrote:
>The nonsense pathnames look like:
>pjdesk% ls -l .java/.userPrefs/remote=20
>total 10
>drwxr-xr-x  3 pjeremy  inplat  512 Mar 25 14:53 _!$%!:w!5!#4!:@!4!$g!.g!5!=
$%!.g!x!$g!;@=3D

I finally got motivated enough to chase this down.  After tracking
through the Java code, I've found that the above name is really the
hostname "139.188.91.185" but, for some reason, Java thinks '.' is not
a "safe" character and converts the whole string to a base 64 variant
(modified to support case-insensitive filesystems - so only lower-
case alphabetics are used).
=20
The relevant code is in
j2se/src/solaris/classes/java/util/prefs/FileSystemPreferences.java
and the filename mapping function states:
     * Generally, this is just the node name.  If the node name includes
     * inappropriate characters (as per isDirChar) it is translated to Base=
64.
     * with the underscore  character ('_', 0x5f) prepended.
isDirChar() is documented as:
     * Returns true if the specified character is appropriate for use in
     * Unix directory names.  A character is appropriate if it's a printable
     * ASCII character (> 0x1f && < 0x7f) and unequal to slash ('/', 0x2f),
     * dot ('.', 0x2e), or underscore ('_', 0x5f).
I can understand not wanting '.' as the first char but can anyone
suggest a reason for not wanting it elsewhere?  Note that the BASE64
variant Java uses includes '.' so it is expanding one string into
another string to avoid a char in the first string that can be present
in the second string.  That's whacky...

--=20
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.

--liOOAslEiF7prFVr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkhcFvUACgkQ/opHv/APuIfqWACfXv8YcV9Bpgjz1DjX0QqqcCeP
LooAn3ysqpqTTTYCYzcIft/joa15FO1h
=21lE
-----END PGP SIGNATURE-----

--liOOAslEiF7prFVr--



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