When the looked up serializer does not implement the expected
HeaderDesersializer interface we end up with a ClassCastException. Catch
it, issue a warning and continue.
Change-Id: I70f23733078710507bdc65931e41c1bd02c0684f
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit
b80a043a43abc0948378f2d8cbb5a3b819a1f3bc)
MessageCodeKey key = keyMaker.make(input);
try {
deserializer = registry.getDeserializer(key);
- } catch (IllegalStateException e) {
- LOG.warn("Problem during reading table feature property. Skipping unknown feature property: {}", key);
+ } catch (ClassCastException | IllegalStateException e) {
+ LOG.warn("Problem during reading table feature property. Skipping unknown feature property: {}",
+ key, e);
input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
continue;
}