Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potentially implement annotation introspector findPrimaryCreator #681

Open
pjfanning opened this issue Jul 10, 2024 · 1 comment
Open

potentially implement annotation introspector findPrimaryCreator #681

pjfanning opened this issue Jul 10, 2024 · 1 comment

Comments

@pjfanning
Copy link
Member

This method was added the AnotationIntrospector base class in jackson-databind 2.18 and returns null by default.
From my testing, the declaredConstructors are what jackson-databind picks up via Java reflection and appears to be accurate.

  override def findPrimaryCreator(config: MapperConfig[_], valueClass: AnnotatedClass,
                                  declaredConstructors: java.util.List[PotentialCreator],
                                  declaredFactories: java.util.List[PotentialCreator]): PotentialCreator = ???

I'm reluctant to make changes to the Scala introspector. I have no open issues that I think this will help me fix and I'm worried that implementing something could change behaviour for some Scala class use cases.

My view is to examine its use if there are real world issues reported for jackson-module-scala.

Fyi @cowtowncoder

@cowtowncoder
Copy link
Member

@pjfanning That is fair: don't fix what ain't broken. I think Kotlin module has added more magic that could be removed than Scala module.

But this extension point is available, should there be need by Scala and other modules (including custom modules by developers outside Jackson team).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants