You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
RiakIndex type signature is incorrect [JIRA: CLIENTS-690] #585
While trying to work out how to access indexes via Scala, I had a lot of trouble getting the result of StringBinIndex.named("example") to work with the parameterised riakObject.getIndex method.
After discussion on a Scala list, several Java devs said that the problem stems from the RiakIndex type signature being incorrect.
Instead of:
public <V extends RiakIndex, T extends RiakIndex.Name<V>> V getIndex(T name)
It should be:
public <V extends RiakIndex<?>, T extends RiakIndex.Name<V>> V getIndex(T name)
I myself am not a strong Java dev and so am not able to verify this, but I thought I should forward it along.
I fixed this type signature, as the <?> is more correct, but Scala still has trouble inferring the types. Left a comment in the javadocs to address this.
Unsure of what work will need to be done to get Scala to infer the types correctly (probably a rewrite of RiakIndex et al.).
While trying to work out how to access indexes via Scala, I had a lot of trouble getting the result of StringBinIndex.named("example") to work with the parameterised riakObject.getIndex method.
After discussion on a Scala list, several Java devs said that the problem stems from the RiakIndex type signature being incorrect.
I myself am not a strong Java dev and so am not able to verify this, but I thought I should forward it along.