android / android/android-test
Allow multiple calls to `Intents.release()` without matching calls to `init()`
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
[1.3.0 release notes ](https://developer.android.com/jetpack/androidx/releases/test#1.3.0)say:
> Allow Intents.release without Intents.init
### Steps to Reproduce
This code
```
Intents.init()
Intents.release()
Intents.release()
```
### Expected Results
Allowed, no error.
### Actual Results
Exception on the second call to `release`:
```
java.lang.IllegalStateException: init() must be called prior to using this method.
at androidx.test.espresso.intent.Checks.checkState(Checks.java:70)
at androidx.test.espresso.intent.Intents.internalRelease(Intents.java:331)
at androidx.test.espresso.intent.Intents.release(Intents.java:142)
```
### AndroidX Test and Android OS Versions
AndroidX Test 1.3.0, API 23
Contributor guide
Research direction
Read androidx.test.espresso.intent.Intents.internalRelease in Intents.java around line 331 and Checks.checkState in Checks.java:70, then reproduce the three-call sequence from the issue. Done means repeated Intents.release() calls after one init() complete without an IllegalStateException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100