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

Explicitly specifying type as Map for constructors #326

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

silvanheller
Copy link
Member

Changes in #324 made all constructors take Map as parameter if there are properties. However, this requires explictly searching for Map as class type in reflection. If this is not done, an exception is thrown:

2022-07-26 07:55:04.238 [ssq-0] ERROR o.v.c.c.u.ReflectionHelper - java.lang.NoSuchMethodException: org.vitrivr.cineast.core.features.ProvidedOcrSearch.<init>(java.util.LinkedHashMap)
        at java.base/java.lang.Class.getConstructor0(Class.java:3585)
        at java.base/java.lang.Class.getConstructor(Class.java:2271)
        at org.vitrivr.cineast.core.util.ReflectionHelper.instantiate(ReflectionHelper.java:285)
        at org.vitrivr.cineast.core.util.ReflectionHelper.instantiate(ReflectionHelper.java:272)

This PR fixes that by explictly searching for Map constructors if there is a map passed.

@silvanheller silvanheller requested a review from Spiess July 26, 2022 08:15
@silvanheller silvanheller self-assigned this Jul 26, 2022
@silvanheller silvanheller merged commit f48aede into main Jul 26, 2022
@silvanheller silvanheller deleted the hotfix-reflectioncreation branch July 26, 2022 08:30
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

Successfully merging this pull request may close these issues.

2 participants