src/main/java/io/reactivex/observers/ResourceSingleObserver.java
public final void add(@NonNull Disposable resource) {
        ObjectHelper.requireNonNull(resource, "resource is null");
        resources.add(resource);
    }
public final void add(@NonNull Disposable resource) {
        ObjectHelper.requireNonNull(resource, "resource is null");
        resources.add(resource);
    }
Adds a resource to this ResourceObserver.

@param resource the resource to add

@throws NullPointerException if resource is null