Refactor pretty printing
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / rfc8040 / Insert.java
index 3959a74867c1c071b64763bdde83a4cbffa630c0..96f813bc2dec0e3f09896e5e4726429ffa58664b 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.restconf.nb.rfc8040;
 
 import static java.util.Objects.requireNonNull;
-import static org.opendaylight.restconf.server.api.EventStreamGetParams.optionalParam;
+import static org.opendaylight.restconf.server.api.EventStreamGetParams.mandatoryParam;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.MoreObjects;
@@ -69,10 +69,10 @@ public final class Insert implements Immutable {
 
             switch (paramName) {
                 case InsertParam.uriName:
-                    insert = optionalParam(InsertParam::forUriValue, paramName, paramValue);
+                    insert = mandatoryParam(InsertParam::forUriValue, paramName, paramValue);
                     break;
                 case PointParam.uriName:
-                    point = optionalParam(PointParam::forUriValue, paramName, paramValue);
+                    point = mandatoryParam(PointParam::forUriValue, paramName, paramValue);
                     break;
                 default:
                     throw new IllegalArgumentException("Invalid parameter: " + paramName);