Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Duplicate
-
Affects Version/s: 1.3
-
Fix Version/s: None
-
Component/s: Converters
-
Labels:None
Description
CGLIBEnhancedConverter , line 84 says
if (callbacks.length > 1)
{ throw new ConversionException("Cannot handle CGLIB enhanced proxies with multiple callbacks"); }if (callbacks.length > 1) throws an ConversionException, but if you inspect the callbacks object you can see that this object contains two elements and the problem is that the second of these elements is null!. It's doesn't sense.
So my solution is
if (callbacks.length > 1) {
callbacks = new Callback[]
; // because callbacks[0] has a valid value and callbacks[1] = null
//throw new ConversionException("Cannot handle CGLIB enhanced proxies with multiple callbacks");
}
this works fine to me, but i don't know if this solution resolves the real problem.
I think that solution is not add a null element to callbacks object. The next line 82 could be revised to resolve the problem.
Callback[] callbacks = hasFactory ? ((Factory)source).getCallbacks() : getCallbacks(source);
thanks
Issue Links
- duplicates
-
XSTR-423 CGLIBEnhancedConverter "only one CAllback is registered"