Fix compile error on JDK 18 and later

This is taken from https://github.com/junit-team/junit4/commit/0eb5ce72848d730da5bd6d42902fdd6a8a42055d

There is no recent release of JUnit4 that would contain the fix.

Bug: 313924276
Test: m EXPERIMENTAL_USE_OPENJDK21_TOOLCHAIN=true
Change-Id: I51ac7b680559cfe1cb831a7a38f5daf469b4f242
2 files changed
tree: c55c3ad54ff76e561545974e1e0e828a4fcca7b3
  1. src/
  2. .classpath
  3. .gitignore
  4. .project
  5. Android.bp
  6. build.gradle
  7. CleanSpec.mk
  8. epl-v10.html
  9. LICENSE-junit.txt
  10. METADATA
  11. MODULE_LICENSE_EPL
  12. NOTICE.txt
  13. OWNERS
  14. README.md
  15. README.version
  16. version
README.md

JUnit 4

JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.

For more information, please visit:

Latest Build Status

Built on DEV@cloud