Technical debt reduction (compatibility with future JDKs)
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
open-ended meta issue for JDK compatibility problems of the netbeans codebase
see sub-issues for details
easy way to get a list of for-removal deprecated calls is to start NB with JFR enabled (put into conf so that userdir can be resolved):
```
-J-XX:StartFlightRecording:filename=${netbeans_default_userdir}/var/nb.jfr,settings=default.jfc,dumponexit=true
```
then list with:
```
jfr print --events jdk.DeprecatedInvocation nb.jfr
```
(or open in tools like VisualVM, Mission Control etc)
unfortunately the stored stack is limited to displaying only the first non-jdk frame https://bugs.openjdk.org/browse/JDK-8211238
> The event will have a stack trace but will be truncated to the immediate caller. Take note JMC, as the existing heuristics about reporting truncated stack traces will need to be updated.
which can make finding the usage a bit more difficult
The most obvious method would have been to grep the build log with
```
ant -Djavac.add.compilerargs="-Xmaxwarns 10000 -Xlint:deprecation -Xlint:removal"
```
which is possible since https://github.com/apache/netbeans/pull/8796, but for that we have too many modules still which haven't been moved to the javac release flag yet (https://github.com/apache/netbeans/issues/8813).
Contributor guide
Research direction
Start by reviewing the sub-issues, then use the JFR configuration and `jfr print --events jdk.DeprecatedInvocation nb.jfr` command to identify deprecated invocations. The alternative is to run the documented Ant command with deprecation and removal warnings, while noting the modules not yet using the javac release flag. Done requires resolving a specific compatibility problem described by a sub-issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100