Martin Buchholz martinrb at
Sat Apr 5 20:03:41 UTC 2008

There is a mismatch between the spec and implementation of

    // Returns an opaque token representing the native thread underlying the
    // invoking Java thread.  On systems that do not require signalling,
    // method always returns zero.
    static native long current();


Java_sun_nio_ch_NativeThread_current(JNIEnv *env, jclass cl)
#ifdef __linux__
    return (long)pthread_self();
    return -1;


Which is it, zero or -1?

Please file a bug.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the core-libs-dev mailing list