Skip to content
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

Redundant cast warning in code generated by KolobokeMap #61

Open
huguesb opened this issue Nov 4, 2017 · 0 comments
Open

Redundant cast warning in code generated by KolobokeMap #61

huguesb opened this issue Nov 4, 2017 · 0 comments

Comments

@huguesb
Copy link

huguesb commented Nov 4, 2017

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant