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

Correct parameters index in case of primitive types #82

Closed
denis-zhdanov opened this Issue Dec 22, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@denis-zhdanov
Owner

denis-zhdanov commented Dec 22, 2017

Consider a source below:

void test(int i, @NotNull Integer i2) {
}

The plugin generates a check like below at the moment:

void test(int i, @NotNull Integer i2) {
    if (i2 == null) {
        throw new NullPointerException("Argument 'i2' of type Integer (#0 out of 2, zero-based) is marked by @org.jetbrains.annotations.NotNull but got null for it");
    }
}

Note that incorrect index is specified (#0).

@denis-zhdanov denis-zhdanov self-assigned this Dec 22, 2017

denis-zhdanov added a commit that referenced this issue Dec 23, 2017

@denis-zhdanov

This comment has been minimized.

Owner

denis-zhdanov commented Dec 23, 2017

Done

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