app/src/main/java/org/andstatus/app/context/MyContextHolder.java
/** This is mainly for mocking / testing
     * @return true if succeeded */
This is mainly for mocking / testing
@return true if succeeded
This is mainly for mocking / testing @return true if succeeded
boolean trySetCreator(@NonNull MyContext contextCreatorNew) {
        synchronized (CONTEXT_LOCK) {
            if (!myFutureContext.future.isDone()) return false;
            myFutureContext.getNow().release(() -> "trySetCreator");
            myFutureContext = MyFutureContext.completed(contextCreatorNew);
        }
        return true;
    }
boolean trySetCreator ( @ NonNull MyContext contextCreatorNew ) { synchronized ( CONTEXT_LOCK ) { if ( ! myFutureContext . future . isDone ( ) ) return false ; myFutureContext . getNow ( ) . release ( ( ) -> "trySetCreator" ) ; myFutureContext = MyFutureContext . completed ( contextCreatorNew ) ; } return true ; }
This is mainly for mocking / testing
 @return true if succeeded
This is mainly for mocking / testing @return true if succeeded