*/
package org.opendaylight.restconf.nb.rfc8040;
-import static com.google.common.base.Preconditions.checkArgument;
-
import com.google.common.base.MoreObjects;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
public static @NonNull NotificationQueryParams of(final StartTimeParam startTime, final StopTimeParam stopTime,
final FilterParam filter, final LeafNodesOnlyParam leafNodesOnly,
final SkipNotificationDataParam skipNotificationData) {
- checkArgument(stopTime == null || startTime != null,
- "Stop-time parameter has to be used with start-time parameter.");
+ if (stopTime != null && startTime == null) {
+ throw new IllegalArgumentException(StopTimeParam.uriName + " parameter has to be used with "
+ + StartTimeParam.uriName + " parameter");
+ }
return new NotificationQueryParams(startTime, stopTime, filter, leafNodesOnly, skipNotificationData);
}