code: private static Spliterator.OfDouble adapt(Spliterator<Double> s) {
          if (s instanceof Spliterator.OfDouble) {
              return (Spliterator.OfDouble) s;
          } else {
  //            if (Tripwire.ENABLED)
  //                Tripwire.trip(AbstractPipeline.class,
  //                              "using DoubleStream.adapt(Spliterator<Double> s)");
              throw new UnsupportedOperationException("DoubleStream.adapt(Spliterator<Double> s)");
          }
      }
docs: Adapt a {@code Spliterator<Double>} to a {@code Spliterator.OfDouble}.
  
  @implNote
  The implementation attempts to cast to a Spliterator.OfDouble, and throws
  an exception if this cast is not possible.