core/play/src/main/java/play/libs/F.java
private static Executor toExecutor(ExecutionContext ec) {
    ExecutionContext prepared = ec.prepare();
    if (prepared instanceof Executor) {
      return (Executor) prepared;
    } else {
      return prepared::execute;
    }
  }
private static Executor toExecutor(ExecutionContext ec) {
    ExecutionContext prepared = ec.prepare();
    if (prepared instanceof Executor) {
      return (Executor) prepared;
    } else {
      return prepared::execute;
    }
  }
private static Executor toExecutor ( ExecutionContext ec ) { ExecutionContext prepared = ec . prepare ( ) ; if ( prepared instanceof Executor ) { return ( Executor ) prepared ; } else { return prepared :: execute ; } }
Converts the execution context to an executor, preparing it first.

@param ec the execution context.
@return the Java Executor.
Converts the execution context to an executor preparing it first .