jakartaee / jakartaee/jsonb-api
visibility SPI does not enable to implement default rules
- Dominant language
- Java
- Stars
- 95
- Forks
- 41
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 35
Description
The default implicit visibility spi equivalent has rules like "if there is a field and some getter/setter ....", this can only be implemented if you have the field + the clazz being mapped (example ClassWithField and SubClassWithGetterForField). Current SPI does not enable to implement that.
Idea of this ticket is to give a context enabling to implement such a rule passing the class being mapped too and if it is for serialization or deserialization (I guess we want a context `{field,class,type}`).
Similarly for methods we would need a context too.
Current methods can be implemented with a default in a ContextAwarePropertyVisibility new SPI to not break backward compatibility maybe?
Contributor guide
Research direction
Start by reviewing the existing visibility SPI and the proposed ContextAwarePropertyVisibility compatibility approach in issue #328. Define the context needed for fields and methods, including the mapped class and serialization or deserialization direction; done means default visibility rules can use that context without breaking existing implementations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100