Closed Bug 1689745 Opened 3 years ago Closed 3 years ago

Throw specialized exception instead of IllegalArgumentException in Image#getBitmap

Categories

(GeckoView :: General, task, P3)

Unspecified
All

Tracking

(firefox87 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: agi, Assigned: agi)

References

Details

Attachments

(1 file)

Related to Bug 1689364, since we expect apps to catch this exception we should throw a specialized exception so that they don't have to catch something as broad as IllegalArgumentException.

Severity: -- → N/A
Priority: -- → P3
Assignee: nobody → agi
Status: NEW → ASSIGNED
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0c965255e798
Throw ImageProcessingException in Image#getBitmap. r=aklotz,esawin

Backed out for causing lint failure on geckoview/Image.java

backout: https://hg.mozilla.org/integration/autoland/rev/a36b493b6097c6375af0a98801a3071d03efbd13

push: https://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=cgKpciATRfy4nI3V3roaOw.0&revision=0c965255e79864a81bd26491e2ae95c6bc999aea&group_state=expanded

push with the first occurrence: https://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=VLfOnu3BQzOpkzS0EL7Qvw.0&revision=f776093eab9ebe582996c19914d165e790d4f349&searchStr=linting%2Copt%2Candroid%2Cgradle%2Ctests%2Csource-test-mozlint-android-lints%2Clints

failure log: https://treeherder.mozilla.org/logviewer?job_id=328919271&repo=autoland&lineNumber=1055

[task 2021-02-04T22:17:39.276Z] Daemon will be stopped at the end of the build stopping after processing
[task 2021-02-04T22:17:46.978Z] > Task :geckoview:preBuild UP-TO-DATE
[task 2021-02-04T22:17:46.979Z] > Task :geckoview:preWithGeckoBinariesDebugBuild UP-TO-DATE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:compileWithGeckoBinariesDebugAidl UP-TO-DATE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:compileWithGeckoBinariesDebugRenderscript NO-SOURCE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:checkWithGeckoBinariesDebugManifest UP-TO-DATE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:generateWithGeckoBinariesDebugBuildConfig UP-TO-DATE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:generateWithGeckoBinariesDebugResValues UP-TO-DATE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:generateWithGeckoBinariesDebugResources UP-TO-DATE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:packageWithGeckoBinariesDebugResources UP-TO-DATE
[task 2021-02-04T22:17:47.378Z] > Task :geckoview:processWithGeckoBinariesDebugManifest UP-TO-DATE
[task 2021-02-04T22:17:47.477Z] > Task :geckoview:generateWithGeckoBinariesDebugRFile UP-TO-DATE
[task 2021-02-04T22:17:47.876Z] > Task :geckoview:compileWithGeckoBinariesDebugKotlin UP-TO-DATE
[task 2021-02-04T22:17:53.276Z] > Task :geckoview:checkstyleWithGeckoBinariesDebug
[task 2021-02-04T22:17:53.361Z]
[task 2021-02-04T22:17:53.362Z] Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
[task 2021-02-04T22:17:53.363Z] Use '--warning-mode all' to show the individual deprecation warnings.
[task 2021-02-04T22:17:53.364Z] See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
[task 2021-02-04T22:17:53.365Z]
[task 2021-02-04T22:17:53.365Z] BUILD SUCCESSFUL in 15s
[task 2021-02-04T22:17:53.366Z] 9 actionable tasks: 1 executed, 8 up-to-date
[task 2021-02-04T22:17:53.747Z] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Image.java:53:19 | Unexpected api change. Please run ./gradlew geckoview:apiLintWithGeckoBinariesDebug for more information (api_changes)
[taskcluster 2021-02-04 22:17:54.780Z] === Task Finished ===

Failure did not appear on the initial push due to another lint covering it, also backed out.
According to hg https://hg.mozilla.org/integration/autoland/rev/0c965255e79864a81bd26491e2ae95c6bc999aea TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Image.java:53:19 | Unexpected api change. Please run ./gradlew geckoview:apiLintWithGeckoBinariesDebug for more information (api_changes) points to this landing

Flags: needinfo?(agi)

oh man I got apilint'd. Sorry about that!

Flags: needinfo?(agi)
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa4eccc29775
Throw ImageProcessingException in Image#getBitmap. r=aklotz,esawin
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: