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

JSpecify: Handle @Nonnull elements in @Nullable content arrays #963

Merged
merged 17 commits into from
Jun 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added direct checks
  • Loading branch information
armughan11 committed Jun 4, 2024
commit ff785761ba07e6970a951ee206c26c8731d21fa4
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,12 @@

@Override
public Element getJavaElement() {
return this.javaElement;

Check warning on line 26 in nullaway/src/main/java/com/uber/nullaway/dataflow/ArrayIndexElement.java

View check run for this annotation

Codecov / codecov/patch

nullaway/src/main/java/com/uber/nullaway/dataflow/ArrayIndexElement.java#L26

Added line #L26 was not covered by tests
}

@Nullable
public Integer getConstantIndex() {
return this.constantIndex;
}

@Nullable
public Element getVariableElement() {
return this.variableElement;
}

@Override
public String toString() {
return "ArrayIndexElement{"

Check warning on line 31 in nullaway/src/main/java/com/uber/nullaway/dataflow/ArrayIndexElement.java

View check run for this annotation

Codecov / codecov/patch

nullaway/src/main/java/com/uber/nullaway/dataflow/ArrayIndexElement.java#L31

Added line #L31 was not covered by tests
+ "javaElement="
+ javaElement
+ ", constantIndex="
Expand All @@ -56,7 +46,7 @@
&& Objects.equals(constantIndex, other.constantIndex)
&& Objects.equals(variableElement, other.variableElement);
}
return false;

Check warning on line 49 in nullaway/src/main/java/com/uber/nullaway/dataflow/ArrayIndexElement.java

View check run for this annotation

Codecov / codecov/patch

nullaway/src/main/java/com/uber/nullaway/dataflow/ArrayIndexElement.java#L49

Added line #L49 was not covered by tests
}

@Override
Expand Down
Loading