Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Flatten IndicesModule and add tests #12921
The IndicesModule was made up of two submodules, one which handled registering queries, and the other for registering hunspell dictionaries. This change moves those into IndicesModule. It also adds a new extension point type, InstanceMap. This is simply a Map<K,V>, where K and V are actual objects, not classes like most other extension points. I also added a test method to help testing instance map extensions. This was particularly painful because of how guice binds the key and value as separate bindings, and then reconstitutes them into a Map at injection time. In order to gain access to the object which links the key and value, I had to tweak our guice copy to not use an anonymous inner class for the Provider.
Note that I also renamed the existing extension point types, since they were very redundant. For example, ExtensionPoint.MapExtensionPoint is now ExtensionPoint.ClassMap.