Fix few code issues
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / gnpy / GnpyServiceImpl.java
index 91d934436b56a3e8bb7ff4a53dbf92f8554b9726..271fc3a54ce60c97837208a4e7a3c36bf947ad6a 100644 (file)
@@ -112,12 +112,8 @@ public class GnpyServiceImpl {
         this.mapDisgNodeRefNode = gnpyTopo.getMapDisgNodeRefNode();
         this.mapLinkFiber = gnpyTopo.getMapLinkFiber();
         this.trxList = gnpyTopo.getTrxList();
-        try {
-            this.pathRequest = extractPathRequest(input, atoz, requestId.toJava(), pceHardConstraints);
-            this.synchronization = extractSynchronization(requestId);
-        } catch (NullPointerException e) {
-            throw new GnpyException("In GnpyServiceImpl: one of the elements is null",e);
-        }
+        this.pathRequest = extractPathRequest(input, atoz, requestId.toJava(), pceHardConstraints);
+        this.synchronization = extractSynchronization(requestId);
     }
 
     public GnpyServiceImpl(PathComputationRequestInput input, ZToADirection ztoa, Uint32 requestId,
@@ -126,12 +122,8 @@ public class GnpyServiceImpl {
         this.mapDisgNodeRefNode = gnpyTopo.getMapDisgNodeRefNode();
         this.mapLinkFiber = gnpyTopo.getMapLinkFiber();
         this.trxList = gnpyTopo.getTrxList();
-        try {
-            pathRequest = extractPathRequest(input, ztoa, requestId.toJava(), pceHardConstraints);
-            synchronization = extractSynchronization(requestId);
-        } catch (NullPointerException e) {
-            throw new GnpyException("In GnpyServiceImpl: one of the elements of service is null",e);
-        }
+        pathRequest = extractPathRequest(input, ztoa, requestId.toJava(), pceHardConstraints);
+        synchronization = extractSynchronization(requestId);
     }
 
     private Map<PathRequestKey, PathRequest> extractPathRequest(