Skip to content

Commit

Permalink
Add requireNonNull for listener objects
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Aug 15, 2024
1 parent eb454aa commit b4751f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private PythonMergedListenerAdapter(
@NotNull PyObject pyOnFailureCallback) {
super(Arrays.asList(recorders), Arrays.asList(dependencies), listenerDescription, null);
Arrays.stream(recorders).forEach(rec -> rec.setMergedListener(this));
this.pyListenerCallable = PythonUtils.pyMergeListenerFunc(pyListener);
this.pyListenerCallable = PythonUtils.pyMergeListenerFunc(Objects.requireNonNull(pyListener));
this.pyOnFailureCallback = Objects.requireNonNull(pyOnFailureCallback);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private PythonReplayListenerAdapter(
@Nullable NotificationQueue.Dependency... dependencies) {
super(description, source, retain);
this.dependencies = dependencies;
this.pyListenerCallable = PythonUtils.pyListenerFunc(pyListener);
this.pyListenerCallable = Objects.requireNonNull(PythonUtils.pyListenerFunc(pyListener));
this.pyOnFailureCallback = Objects.requireNonNull(pyOnFailureCallback);
}

Expand Down

0 comments on commit b4751f1

Please sign in to comment.