Closed Bug 1839578 Opened 2 years ago Closed 2 years ago

ktlintFormat fails throwing ExceptionInInitializerError

Categories

(Firefox for Android :: General, defect, P1)

Firefox 116
All
Android
defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox114 --- unaffected
firefox115 --- unaffected
firefox116 --- fixed

People

(Reporter: mavduevskiy, Assigned: mcarare)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce

  1. checkout main branch. change any file
  2. 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?

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.

Flags: needinfo?(mcarare)
Assignee: nobody → mcarare
Flags: needinfo?(mcarare)

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.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

Mihai Thanks for putting the patch, you made my day 🙌!

Already confirmed with people having this issue that it is solved now.
No additional QA is needed.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: