title: Trying to convert a kotlin method to java that uses RxJava
body: <pre><code>Android Studio 3.1 RC 2
  kotlin 1.2.30
  </code></pre>
  
  <p>Signature for the fetchMessage </p>
  
  <pre><code>Single&lt;Response&gt; fetchMessage(final String messageId);
  </code></pre>
  
  <p>The kotlin code that I am trying to convert to Java. However, I am not sure where the returns are? As I am new to kotlin and lambda.</p>
  
  <pre><code>private fun getMessage(messageId: String): Observable&lt;State&gt; {
          return repository
                  .fetchMessage(messageId)
                  .flatMap {
                      Single.fromCallable&lt;State&gt;({
                          update(messageId, it, State.COMPLETED)
                          State.COMPLETED
                      })
                  }
                  .toObservable()
  }
  </code></pre>
  
  <p>This is my attempt at trying to convert it. However, the compiler complains of a missing return.</p>
  
  <pre><code>public Observable&lt;TranslationChatState&gt; translate(String messageId) {
          return repository
                  .fetchMessage(messageId)
                  .flatMap(new Func1 &lt;Response, Single&lt;State &gt;&gt;() {
                      @Override
                      public Single&lt;State&gt; call(final Response response) {
                          Single.fromCallable(new Callable&lt;State&gt;() {
                              @Override
                              public State call() {
                                  update(messageId, response, State.COMPLETED);
                                  return State.COMPLETED;
                              }
                          });
                      } /* complains about no return here */
                  })
                  .toObservable();
  }
  </code></pre>
  
  <p>Many thanks for any suggestions,</p>