Fix Bug 271
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / common / ConvertReactor.java
index a26c0aa31c8846c71f22a8b6d93d4c353770a593..3def2450eab45582e955aca9cc39cdce800ce35a 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common;
 
+import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -40,17 +41,14 @@ public abstract class ConvertReactor<FROM> {
      * @param target 
      */
     @SuppressWarnings("unchecked")
-    public <RESULT, TARGET> void convert(FROM source, short version, TARGET target) {
-        if (source == null) {
-            return;
-        }
+    public <RESULT, TARGET> void convert(FROM source, short version, TARGET target,BigInteger datapathid) {
         
         //lookup converter
         Convertor<FROM, RESULT> convertor = (Convertor<FROM, RESULT>) conversionMapping.get(version);
         if (convertor == null) {
             throw new IllegalArgumentException("convertor for given version ["+version+"] not found");
         }
-        RESULT convertedItem = convertor.convert(source);
+        RESULT convertedItem = convertor.convert(source,datapathid);
         
         //lookup injection
         InjectionKey key = new InjectionKey(version, target.getClass().getName());