+/**
+ * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
package org.opendaylight.openflowplugin.openflow.md.core.translator;
import java.math.BigInteger;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import org.opendaylight.openflowplugin.openflow.md.core.ByteUtil;
import org.opendaylight.openflowplugin.openflow.md.core.IMDMessageTranslator;
import org.opendaylight.openflowplugin.openflow.md.core.SwitchConnectionDistinguisher;
import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
+import org.opendaylight.openflowplugin.openflow.md.util.ByteUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.errors.rev131116.ErrorType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotificationBuilder;
if (msg instanceof ErrorMessage) {
ErrorMessage message = (ErrorMessage) msg;
List<DataObject> list = new CopyOnWriteArrayList<DataObject>();
- LOG.error(" Error Message received: type={}[{}], code={}[{}], data={}[{}] ", message.getType(),
- message.getTypeString(), message.getCode(), message.getCodeString(), new String(message.getData()),
+ LOG.debug(" Error Message received: type={}[{}], code={}[{}], data=[{}] ", message.getType(),
+ message.getTypeString(), message.getCode(), message.getCodeString(),
ByteUtil.bytesToHexstring(message.getData(), " "));
// create a Node Error Notification event builder
return list;
} else {
LOG.error("Message is not of Error Message ");
- return null;
+ return Collections.emptyList();
}
}