The relevant Java code:

// its class extends Thread

// assigned a value in static initializer
public static volatile ClassLoader classLoader = null;

What happens when I try access it from Clojure:

user=> vemv.NGSession/classLoader

IllegalAccessException Class clojure.lang.Reflector can not access a member 
of class vemv.NGSession with modifiers "public static volatile"  
sun.reflect.Reflection.ensureMemberAccess (Reflection.java:95)

Fortunately I could reproduce the issue isolatedly, in the following class 
which has no dependencies/etc: https://gist.github.com/vemv/5180168

If I try reproduce the issue absolutely from scratch though, it disappears:

package vemv;

public class Foo extends Thread {
    public static volatile ClassLoader classLoader = null;
    static {
        try {
            classLoader = Foo.class.getClassLoader();
        } catch (SecurityException e) {
            throw e;
        }
    }
}

Any ideas? Should I just open a bug report?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to