Syncleus / Ferma

An ORM / OGM for the TinkerPop graph stack.
http://syncleus.com/Ferma
Apache License 2.0
137 stars 26 forks source link

Dependency reflections 0.9.12 doesn't add scanners on empty urls #60

Closed porunov closed 4 years ago

porunov commented 4 years ago

In reflections version 0.9.12 there is a bug which may indirectly be a problem when Ferma is used with JanusGraph. Here in JanusGraph we retrieve PreInitializeConfigOptions even if there is no scanUrls. https://github.com/JanusGraph/janusgraph/blob/677a57aa985a7ea47af70d0eaba30171d765c79d/janusgraph-core/src/main/java/org/janusgraph/core/util/ReflectiveConfigOptionLoader.java#L248

This works fine till reflections version 0.9.12 which introduces the next bug: https://github.com/ronmamo/reflections/issues/273

The thing is that the method getTypesAnnotatedWith should return empty collection but instead it breaks existing contract and returns a wrong exception.

I think, it would be good to downgrade reflections to 0.9.11 till the bug isn't fixed. After that, it would be better to avoid 0.9.12 version and upgrade directly to the version where it is fixed (i.e. 0.9.13 or later).

freemo commented 4 years ago

I can approve of this. Would it be possible to write a unit test that demonstrates this bug to assist us in upgrading it later on?