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;
return list;
} else {
LOG.error("Message is not of Error Message ");
- return null;
+ return Collections.emptyList();
}
}
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;
return list;
}else {
LOG.error( "Message is not of Experimenter Error Message " ) ;
- return null;
+ return Collections.emptyList();
}
}
package org.opendaylight.openflowplugin.openflow.md.core.translator;
import java.math.BigInteger;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
return list;
} else {
LOG.error("Message is not a flow removed message ");
- return null;
+ return Collections.emptyList();
}
}
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;
list.add(nodeUpdated);
return list;
} else {
- return null;
+ return Collections.emptyList();
}
}
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;
}
return list;
} else {
- return null;
+ return Collections.emptyList();
}
}
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;
return listDataObject ;
}
- return null;
+ return Collections.emptyList();
}
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;
return list;
}
}
- return null;
+ return Collections.emptyList();
}
}
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;
return list;
} else {
// TODO - Do something smarter than returning null if translation fails... what Exception should we throw here?
- return null;
+ return Collections.emptyList();
}
}
}
cookie = conductor.getAuxiliaryKey();
}
List<OUT> translatorOutput = translator.translate(cookie, conductor.getSessionContext(), message);
- if(translatorOutput != null) {
- result.addAll(translator.translate(cookie, conductor.getSessionContext(), message));
+ if(translatorOutput != null && !translatorOutput.isEmpty()) {
+ result.addAll(translatorOutput);
}
}
} else {