Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
I have the following code:
After generating an apk and decoding the containing classes.dex I can see that the new code is skipping the first null check (points == null) and immediately gets the array length. That of course results in a runtime NullPointer Exception (this is how I was made aware of it).
Using com.android.tools.build:gradle:8.6.1 shows that the check is still present in the resulting final dex, however using com.android.tools.build:gradle:8.7.0 does not. I also tested com.android.tools.build:gradle:8.9.0-rc02 and the issue is still present.
Gradle wrapper for tests: https://services.gradle.org/distributions/gradle-8.11.1-bin.zip
gradle.properties contains this setting (unsure if important)
Here the correct dex (up to 8.6.1):
Here the INCORRECT dex (8.7.0 and greater):