typetools / typetools/checker-framework

Constant Value Checker: eliminate @StaticallyExecutable annotation and statically-executable.astub file

Open
#1,008 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

The annotation @StaticallyExecutable is not needed.

Instead, the Constant Value Checker should use any @Pure method whose argument and return types are all:

  • primitives
  • primitive wrappers
  • Strings, CharSequence, and other immutable types to be indentified later
  • arrays of the above

Once this is done, the file statically-executable.astub is no longer needed, or at least the JDK parts of it can be eliminated. (Make sure anything that it marked as @StaticallyExecutable is @Pure in the annotated JDK.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Constant Value Checker implementation and the statically-executable.astub file, then inspect the annotated JDK declarations marked @StaticallyExecutable. Verify that those declarations are @Pure and determine which supported immutable types and array signatures are covered. Done means the annotation is eliminated and the JDK portions of the stub file are no longer needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.