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

Invalid call to Builder-setter from Java TypeAdapter #211

Merged
merged 1 commit into from
May 22, 2019

Conversation

RicoYao
Copy link
Contributor

@RicoYao RicoYao commented May 22, 2019

The setter method name was not correctly generated in the TypeAdapter.
Added a field to board.json example to surface the issue, and ensure tests catch it.

The setter method name was not correctly generated in the TypeAdapter.
Added a field to board.json example to surface the issue, and ensure tests catch it.
@@ -176,7 +176,7 @@ public struct JavaModelRenderer: JavaFileRenderer {

func renderBuilderSetters(modifiers: JavaModifier = [.public]) -> [JavaIR.Method] {
let setters = transitiveProperties.map { param, schemaObj in
JavaIR.method(modifiers, "Builder set\(Languages.java.snakeCaseToCamelCase(param))(\(self.typeFromSchema(param, schemaObj)) value)") { [
JavaIR.method(modifiers, "Builder set\(Languages.java.snakeCaseToCapitalizedPropertyName(param))(\(self.typeFromSchema(param, schemaObj)) value)") { [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only actual real code change in this PR.

@rahul-malik rahul-malik merged commit 8d23c9b into pinterest:master May 22, 2019
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.

3 participants