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

#195 bug fix dont throw null pointer when rows is empty #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

polyglotpiglet
Copy link
Contributor

No description provided.

Copy link
Member

@chbatey chbatey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Two minor changes then LGTM

@@ -355,7 +355,7 @@ public long getFixedDelay() {

public static class ThenBuilder {
private List<CqlType> variable_types;
private List<Map<String, ? extends Object>> rows;
private List<Map<String, ? extends Object>> rows = new ArrayList<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collections.emptyList

stubFor(post(urlEqualTo(PRIME_PREPARED_PATH)).willReturn(aResponse().withStatus(200)));
PrimingRequest pr = PrimingRequest.preparedStatementBuilder()
.withQuery("select * from people")
.withThen(PrimingRequest.then().withVariableTypes(TEXT))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable types are the ? in prepared statements, yours has none so can remove the withVariableTypes. This is a stubbed tests so doesn't really matter but the real server would reject this priming request.

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

Successfully merging this pull request may close these issues.

2 participants