We need to cast the returned class, as the Javassist API no longer
does so.
Change-Id: Ib19477ece9e76b735285df3b553ca9504579f8c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
type.getTypeName(), type.getClassLoader(), serializerName);
final DataObjectSerializerSource source = generateEmitterSource(type, serializerName);
final CtClass poolClass = generateEmitter0(type, source, serializerName);
- @SuppressWarnings("unchecked")
final Class<? extends DataObjectSerializerImplementation> cls = poolClass.toClass(type.getClassLoader(),
- type.getProtectionDomain());
+ type.getProtectionDomain()).asSubclass(DataObjectSerializerImplementation.class);
/*
* Due to OSGi class loader rules we cannot initialize the fields during