-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support for char fields #26
Labels
bug
Something isn't working
Comments
CharType does not exist in Pact, so I change to be a StringType @Example("a")
private char aChar1;
private char aChar2; Code generated String aChar1 = "a";
String aChar2 = "g";
;
public DemoClassBuilder setAChar1(final String aChar1) {
this.aChar1 = aChar1;
return this;
}
public DemoClassBuilder setAChar2(final String aChar2) {
this.aChar2 = aChar2;
return this;
}
public DslPart build() {
PactDslJsonBody pactDslJsonBody = new PactDslJsonBody();
if (Objects.nonNull(aChar1)) {
pactDslJsonBody.stringType("aChar1", aChar1);
}
if (Objects.nonNull(aChar2)) {
pactDslJsonBody.stringType("aChar2", aChar2);
}
return pactDslJsonBody;
} |
github-project-automation
bot
moved this from In Progress
to Done
in PactDslBuilder - annotation processor
Nov 16, 2023
Support for char[] is still pending
|
@apenlor the problem you reported happens in every type of Array |
Makes sense :) |
github-project-automation
bot
moved this from In Progress
to Done
in PactDslBuilder - annotation processor
Nov 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Both char or char[] fields are causing failures during the compilation.
For char
java: incompatible types: java.lang.String cannot be converted to char
For char[]
java: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "o" is null
The text was updated successfully, but these errors were encountered: