Open kasarit opened 1 year ago
Consider provididing a default implementation in the superclass instead of duplicating the accepts method in every subclass. E.g.
protected T accepts(final AviationWeatherMessageOrCollection message) throws SerializingException { final Class<T> bulletinClass = getBulletinClass(); if (bulletinClass.isInstance(message)) { return bulletinClass.cast(message); } else { throw new SerializingException("Can only serialize " + bulletinClass.getSimpleName()); } }
And then remove each override doing the same thing.
_Originally posted by @petringo in https://github.com/fmidev/fmi-avi-messageconverter-tac/pull/117#discussion_r989679365_
Consider provididing a default implementation in the superclass instead of duplicating the accepts method in every subclass. E.g.
And then remove each override doing the same thing.
_Originally posted by @petringo in https://github.com/fmidev/fmi-avi-messageconverter-tac/pull/117#discussion_r989679365_