if (
(is_null($compressorInstance->getCompressor()))
|| (!is_object($compressorInstance->getCompressor()))
- || (!method_exists($compressorInstance->getCompressor(), 'compressStream'))
- || (!method_exists($compressorInstance->getCompressor(), 'decompressStream'))
+ || (!$compressorInstance instanceof Compressor)
) {
// Set the null compressor handler. This should not be configureable!
+ // @TODO Is there a configurable fall-back compressor needed, or is NullCompressor okay?
$compressorInstance->setCompressor(ObjectFactory::createObjectByName('NullCompressor'));
} // END - if