palantir / palantir/conjure-java
Introduce default visitUnknown for enum visitors
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 39
- Forks
- 49
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 32
Description
What happened?
The Visitor generated for enums requires implementations to handle the visitUnknown case, but we literally never do anything other than throw a generic exception in the unknown case.
What did you want to happen?
Either provide a default implementation for visitUnknown or generate a StrictVisitor where accept(StrictVisitor) handles the unknown case instead of passing the responsibility on to the implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the enum Visitor generation entry point and inspecting how visitUnknown is produced and invoked. Clarify whether the intended result is a default visitUnknown implementation or a StrictVisitor, then define completion as generated visitors handling unknown enum values without requiring each implementation to provide the generic exception behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100