-
-
Notifications
You must be signed in to change notification settings - Fork 702
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
0.10-RC1: Incorrect example for TypesAnnotated.with() #337
Comments
thanks @davidburstrom , I've fixed the readme example. |
I'm a little surprised though, I'd have thought the README actually was more correct than the code. What I used in 0.9.12 was
which worked great. In 0.10-RC1, I had to adapt the return type to
which stopped returning results. Further changing of that into
brought me even further from the target, and didn't return anything either. |
will change the results from Collection back to Set. empty result - suspected changes are in ConfigurationBuilder or FilterBuilder, can you check the differences in the effective preferably use the explicit constructor to avoid ambiguity (will improve javadoc/readme), such as
either of the above will provide workable input, thanks for the coop! |
I personally have nothing against using With 0.9.12 and new Reflections("valid").getTypesAnnotatedWith(OptionsInterface.class); the configuration looks like and with 0.10-RC1 and final ConfigurationBuilder configurationBuilder =
new ConfigurationBuilder().addUrls(ClasspathHelper.forPackage("valid"));
configurationBuilder.setInputsFilter(new FilterBuilder().includePattern(".*"));
final Reflections reflections = new Reflections(configurationBuilder); the configuration looks like The URLs are identical and I've confirmed that they contain the expected classes. I've yet to find a spec that produces any output. |
thanks @davidburstrom for your valuable feedback and time! these will be addressed for the next release. |
Trying out RC2, there are no changes required to use the Reflections API, but still, when querying for all types annotated with X, there are zero results where there used to be non-zero with 0.9.12. |
thanks @davidburstrom , but I couldn't find a way to reproduce it. it might be some javassist issue (downgrade can provide more input). you can send me the jar on email and i'll take a closer look. |
I'll try and reproduce it in a self-enclosed project, hang on. |
There you go, fails on my machine at least. Just run |
ok got it. this is now marked as a known issue and will be fixed on next release, looks like it's going to be earlier than I thought... |
Great, thanks! |
fixed in 0.10.1 |
I can confirm the fix works as intended in 0.10.1 :) |
In the example in the readme it states that
In 0.10-RC1, it results in a
Set<String>
, aswith()
is backed bydefault QueryFunction<Store, String> with(Class<?>... keys) { return of(keys); }
. Not only that, the collection is empty contrary to what was returned in 0.9.12.The text was updated successfully, but these errors were encountered: