camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babak Vahdat <>
Subject Re: Question camel cxf & CXF_MESSAGE
Date Thu, 10 Jan 2013 10:54:57 GMT

Don't know much about CXF itself but this is more than obvious as the code
(DefaultCxfBinding line 344) is buggy because one can not simply cast an
array of *primitive* type ("[B" means array of byte) to Object[] which is an
array of *reference* type!

You would get the same stack trace if you would try to run the crappy code

    public static void main(String[] args) {
        byte[] bytes = new byte[] {3, 4};
        if (bytes.getClass().isArray()) {
            System.out.println("yes it's an array BUT of the primitive
            Object array = bytes;
            Object[] casted = (Object[]) array; // BOOM

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message