Detects deadlock occurring at static initialization timing [LUCENE-9672]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
This issue relates to #10700.
Deadlock can be happened when a parent class uses a child class at static initialization timing.
Currently we don't check it at build time, so we can push the code to repository even if there's a problem.
So we need some detecting feature for it.
IntelliJ provides an inspection for this, but Eclipse(ECJ Compiler) doesn't.
(What about NetBeans...?)
To make it without IDE dependencies, we just need a script to check if the parent class has code that directly references to the child class during static initialization.
It looks simple, but providing the ability to check each class's inheritance relationship at build time can be harder than I think.
(I didn't check about some technical details.)
Anyway, if there is a tool(static checker?) that can check this problem even if it is not the above method, it would be a great help to the stability of our project.
---
Migrated from [LUCENE-9672](https://issues.apache.org/jira/browse/LUCENE-9672) by Namgyu Kim (@danmuzi), updated Jan 20 2021
Linked issues:
- #10700
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reviewing linked issue #10700 and the static-initialization and inheritance scenario described here; define the checker’s scope and build integration before implementation. Done means the project can detect the described deadlock risk at build time without IDE dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100