}
@Override
- public Message parseMessage(final byte[] buffer) throws PCEPDeserializerException, PCEPDocumentedException {
- if (buffer == null || buffer.length == 0) {
- throw new PCEPDeserializerException("Notification message cannot be empty.");
- }
- final List<Object> objs = parseObjects(buffer);
-
- return validate(objs);
- }
-
- public Message validate(final List<Object> objects) throws PCEPDeserializerException {
+ protected Message validate(final List<Object> objects, final List<Message> errors) throws PCEPDeserializerException {
if (objects == null) {
throw new IllegalArgumentException("Passed list can't be null.");
}
+ if (objects.isEmpty()) {
+ throw new PCEPDeserializerException("Notification message cannot be empty.");
+ }
+
final PCEPErrorMapping maping = PCEPErrorMapping.getInstance();
final List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcntf.message.pcntf.message.Notifications> compositeNotifications = Lists.newArrayList();