Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hborders
Copy link
Contributor

AppindexingUpdateService had a race condition because its call to FirebaseAppIndex#update is asynchronous, but IntentService#onHandleIntent is a synchronous method. The solution is to Tasks#await the Task that FirebaseAppindex#update returns.

`AppindexingUpdateService` had a race condition because its call to `FirebaseAppIndex#update` is asynchronous, but `IntentService#onHandleIntent` is a synchronous method. The solution is to `Tasks#await` the `Task` that `FirebaseAppindex#update` returns.
@samtstern
Copy link
Contributor

@hborders LGTM will merge when green, thank you!

@samtstern
Copy link
Contributor

@hborders the error here is:

> Task :ktlint
/home/travis/build/firebase/snippets-android/appindexing/app/src/main/java/com/google/firebase/example/appindexing/kotlin/AppIndexingUpdateService.kt:49:41: Not a valid Kotlin file (parameters must have type annotation) (cannot be auto-corrected)
"checkstyle" report written to /home/travis/build/firebase/snippets-android/build/reports/ktlint/ktlint-checkstyle-report.xml
> Task :ktlint FAILED
> Task :admob:app:compileDebugJavaWithJavac FROM-CACHE

@hborders
Copy link
Contributor Author

Fixed. Thanks for your patience. Please let me know if you'd like me to squash this.

@samtstern
Copy link
Contributor

@hborders I can "squash and merge" through GitHub, thanks so much for taking the time to do this!

@samtstern
Copy link
Contributor

Ah looks like the same issue as in the quickstart-android PR:

> Task :appindexing:app:compileDebugKotlin FAILED
e: /home/travis/build/firebase/snippets-android/appindexing/app/src/main/java/com/google/firebase/example/appindexing/kotlin/AppIndexingUpdateService.kt: (49, 25): Unresolved reference: ExecutionException

@hborders
Copy link
Contributor Author

Fixed. Thanks again for your patience. I thought I could do this all from vim without setting up a real environment. :)

@samtstern
Copy link
Contributor

Soooo close:

> Task :appindexing:app:compileDebugJavaWithJavac FAILED
/home/travis/build/firebase/snippets-android/appindexing/app/src/main/java/com/google/firebase/example/appindexing/AppIndexingUpdateService.java:8: error: ';' expected
import com.google.android.gms.tasks.Tasks

@samtstern samtstern merged commit afbab20 into firebase:master Nov 11, 2019
@samtstern
Copy link
Contributor

@hborders thank you! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants