Question

I have constant with type byte[] which contains only one symbol { 0 }. I tried to inject this constant to another bean SomeBean which contains method setSomeField(T field) through property tag.

Type of injected value is parametrized.

I tried to inject this constant through util:constant and got Byte type instead of byte[]. Then I tried to use factory bean with method byte[] getSomeField() and got Byte type again.

Could somebody explain why this happen? And how can I avoid this behavior?

I created repository with demonstration of this issue

Was it helpful?

Solution

It's a Spring beans bug, fixed in version >= 3.2.5

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top