7043788: (fs) PosixFileAttributes.owner() or group() throws NPE if not group in passwd/group database

Chris Hegarty chris.hegarty at oracle.com
Wed May 11 06:25:49 PDT 2011


Looks fine to me.

-Chris.

On 05/11/11 12:33 PM, Alan Bateman wrote:
>
> This is another little embarrassing one. A test that reads the
> PosixFileAttributes and prints out the owner and group-owner fails with
> NPE if the the lookup of the uid or gid fails because it's not in the
> passwd or group database. It turns out that the "not found" handling in
> the native code isn't correct with the result that it returns null for
> these cases instead of failing. The webrev with the changes is here:
>
> http://cr.openjdk.java.net/~alanb/7043788/webrev/
>
> I've decided not to include a test for this because it requires
> privileges to chown or chgrp a file to some unknown uid/gid.
>
> Thanks,
>
> -Alan


More information about the nio-dev mailing list