apache / apache/netbeans

Migrate codebase to the javac '--release' flag where possible

Open
#8,813 1 comment 0 reactions 0 assignees View on GitHub
build Code cleanup Java Upgrade JDK
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

Modules were over time organically updated where needed. We can start to consolidate clusters where enough progress has already been made. PHP cluster as example: https://github.com/apache/netbeans/pull/8802

- the `--release` flag is generally safer compared to source/target since it allows javac to link against the target API level
- allows us to get for-removal deprecation warnings which makes compatibility assessment much easier
- has also positive side effects like the invokedynamic bytecode instruction (when bumped to larger than 8) and a higher API/language level

meta issue to track progress

### Committer

- [x] I acknowledge that I am a maintainer/committer in the Apache NetBeans project.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the PHP cluster example in pull request 8802 and compare how its module build configuration was migrated. Identify another module cluster with enough prior progress, then assess whether its source/target settings can use javac --release. Done means the selected cluster is migrated consistently and its compatibility warnings or build results are checked.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.