ktlintFormat fails throwing ExceptionInInitializerError
Categories
(Firefox for Android :: General, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | unaffected |
firefox115 | --- | unaffected |
firefox116 | --- | fixed |
People
(Reporter: mavduevskiy, Assigned: mcarare)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Steps to reproduce
- checkout main branch. change any file
- run ktlintFormat script
Expected behavior
ktlintFormat successfully finishes work
Actual behavior
Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
Device information
- Firefox version:
- Android device model:
- Android OS version:
Any additional information?
Comment 1•2 years ago
|
||
Set release status flags based on info from the regressing bug 1831352
:mcarare, since you are the author of the regressor, bug 1831352, could you take a look?
For more information, please visit BugBot documentation.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
In JDK 17, it's not possible anymore to make a field accessible using reflection. The actual error here is:
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private transient java.lang.Object java.lang.Throwable.backtrace accessible: module java.base does not "opens java.lang" to unnamed module
A JVM argument for the ktlintFormat
task can be added in order to allow reflection, making the fields in java.lang.
classes accessible.
Note that it does not happen for Focus.
Comment 3•2 years ago
|
||
Comment 4•2 years ago
|
||
Authored by https://github.com/mcarare
https://github.com/mozilla-mobile/firefox-android/commit/e02b2023d0dd890b6d5a4eac0a485bea1e29e1d8
[main] Bug 1839578 - Allow ktlintFormat task to modify access java.lang class fields.
Comment 5•2 years ago
|
||
Mihai Thanks for putting the patch, you made my day 🙌!
Comment 6•2 years ago
|
||
Comment 7•2 years ago
|
||
Authored by https://github.com/mcarare
https://github.com/mozilla-mobile/firefox-android/commit/7adaa3d006f3e5dafedafc00f7f3601f2f49fd99
[main] Bug 1839578 - Allow ktlintFormat task to modify access java.lang class fields.
Assignee | ||
Comment 8•2 years ago
|
||
Already confirmed with people having this issue that it is solved now.
No additional QA is needed.
Description
•