Skip to content

Redundant cast warning in code generated by KolobokeMap #61

@huguesb

Description

@huguesb

The following code

import com.koloboke.compile.KolobokeMap;

@KolobokeMap
public abstract class IntMap<T> {
    public static <T> IntMap<T> withExpectedSize(int size) {
        return new KolobokeIntMap<T>(size);
    }

    public abstract T put(int k, T v);
    public abstract T get(int k);
    public abstract T remove(int k);
}

Compiled with gradle 2.12 / propdeps-plugin:0.0.9.RELEASE / koloboke-compile:0.5.1 / koloboke-impl-common-jdk8:1.0.0 generates the following warning (which breaks compilation in my project as -Werror is enabled):

KolobokeIntMap.java:131: warning: [cast] redundant cast to int
                newFree = ((int) (random.nextInt()));
                           ^
error: warnings found and -Werror specified
1 error
1 warning

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions