Hi!

I have problem while accessing java bean properties via JXPath. Consider following
example.


puvlic class BlaBla {
    public static interface Provider {
        public String getName();
    }

    public static abstract class A implements Provider {
    }

    static class B extends A {
        public String getName() {
            return "theName";
        }
    }

    public static void main(String[] args) throws Exception {
        B b = new B();

        JXPathContext ctx = JXPathContext.newContext(b);

        System.out.println(ctx.getValue("name"));
    }
}

JXPath fails with:
"org.apache.commons.jxpath.JXPathException: Cannot access property: BlaBla$B.name; No read method"


This is may be a bug in the ValueUtils.getAccessibleMethodFromInterfaceNest method.
It doesn't get down thru class hierarchy when looking for public accessor method.


--
All the best,
Vasyl Stashuk

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to