use of org.jboss.marshalling.SerializabilityChecker in project wildfly by wildfly.
the class SimpleMarshallingContext method isMarshallable.
@Override
public boolean isMarshallable(Object object) {
if (object == null)
return true;
MarshallingConfiguration configuration = this.repository.getMarshallingConfiguration(this.repository.getCurrentMarshallingVersion());
try {
ObjectTable table = configuration.getObjectTable();
if ((table != null) && table.getObjectWriter(object) != null)
return true;
ClassExternalizerFactory factory = configuration.getClassExternalizerFactory();
if ((factory != null) && (factory.getExternalizer(object.getClass()) != null))
return true;
SerializabilityChecker checker = configuration.getSerializabilityChecker();
return ((checker == null) ? SerializabilityChecker.DEFAULT : checker).isSerializable(object.getClass());
} catch (IOException e) {
return false;
}
}
Aggregations