Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
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

Description

@TJC

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.

Activity

  1. changed the title [-]RiakIndex type signature is incorrect[/-] [+]RiakIndex type signature is incorrect [JIRA: CLIENTS-690][/+] on Dec 17, 2015
  2. Basho-JIRA commented on Jan 26, 2016

    @Basho-JIRA

    Fix is included on the https://github.com/basho/riak-java-client/tree/scala-improvements branch

    _[posted via JIRA by Alexander Moore]_

  3. alexmoore commented on Feb 1, 2016

    @alexmoore
    Contributor

    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.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions