ArraysAsListSerializer boxed primitive bug

I'm having a problem with ArraysAsListSerializer throwing ClassCastException when it encounters a boxed primitive array. I have created a unit test to replicate it but I'm not sure what the correct fix is.

The cause appears to be that the in write the boxed component type (java.lang.Integer) is written, but in read the component type is the primitive java.lang.Integer.TYPE.