You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.
I had the following code: Optional<IconFace> iconFile = apkFile.getAllIcons().stream().filter(IconFace::isFile).findFirst();
This crashed with a NullPointerExceptionwhen checking isFile. Reason: getAllIcons() returns an AdaptiveIcon instance. However, both foreground and background icons in this instance are null. The public methods are apparently just using the foreground icon anyway but do not check for null objects, hence the crash.
In my opinion getAllIcons() should not return an icon instance if it is actually not a valid icon (doing null checks would just be a workaround). I expect the bug at the time of the AdaptiveIcon instanciation: the APK definitely has an icon and is also accepted in the Google Play Store.
Unfortunately I cannot share the APK for to confidentiality reasons, sorry!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Happens with the latest version 2.6.9.
I had the following code:
Optional<IconFace> iconFile = apkFile.getAllIcons().stream().filter(IconFace::isFile).findFirst();
This crashed with a
NullPointerException
when checkingisFile
. Reason:getAllIcons()
returns anAdaptiveIcon
instance. However, bothforeground
andbackground
icons in this instance are null. The public methods are apparently just using the foreground icon anyway but do not check for null objects, hence the crash.In my opinion
getAllIcons()
should not return an icon instance if it is actually not a valid icon (doing null checks would just be a workaround). I expect the bug at the time of theAdaptiveIcon
instanciation: the APK definitely has an icon and is also accepted in the Google Play Store.Unfortunately I cannot share the APK for to confidentiality reasons, sorry!
The text was updated successfully, but these errors were encountered: