Skip to content

Fix lateinit var shadowing in Android Auth and Firestore reference guides. - #181

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
9F333E352754590D0275EC1B8FC3E437
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
9F333E352754590D0275EC1B8FC3E437

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Fix lateinit var shadowing in Android Auth and Firestore reference guides.

In firebase_auth_basics/references/client_sdk_android.md and firebase_firestore/references/standard/android_sdk_usage.md, AppCompatActivity.onCreate() declared local variables (val auth = Firebase.auth and val db = Firebase.firestore) that shadowed the class-level lateinit var properties (auth and db), causing UninitializedPropertyAccessException at runtime when helper methods accessed auth or db.

Change val auth = ... and val db = ... to property assignments auth = ... and db = ....

…ides.

In `firebase_auth_basics/references/client_sdk_android.md` and `firebase_firestore/references/standard/android_sdk_usage.md`, `AppCompatActivity.onCreate()` declared local variables (`val auth = Firebase.auth` and `val db = Firebase.firestore`) that shadowed the class-level `lateinit var` properties (`auth` and `db`), causing `UninitializedPropertyAccessException` at runtime when helper methods accessed `auth` or `db`.

Change `val auth = ...` and `val db = ...` to property assignments `auth = ...` and `db = ...`.

PiperOrigin-RevId: 982687393
@google-cla

google-cla Bot commented Sep 16, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

0 participants