-
Notifications
You must be signed in to change notification settings - Fork 43
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
For Boolean, Double and Integer properties, getters should be NonNull #178
Conversation
@rahul-malik Probably easiest if you review and (hopefully) merge #177 first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did a first pass, PTAL and let me know what you think
Sources/Core/JavaModelRenderer.swift
Outdated
] | ||
} | ||
default: | ||
return JavaIR.method([.public], typeFromSchema(param, schemaObj) + " get" + param.snakeCaseToCapitalizedPropertyName() + "()") { [ | ||
"return this." + param.snakeCaseToPropertyName() + ";", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with param.snakeCaseToPropertyName()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Sources/Core/JavaFileRenderer.swift
Outdated
@@ -49,6 +49,56 @@ extension JavaFileRenderer { | |||
} | |||
} | |||
|
|||
func wrappedClassNameFromSchema(_ param: String, _ schema: Schema) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this method used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@RicoYao - I'll likely merge the PR that builds Java code tomorrow if you'd like to take a look #176 Basically did the work to get the Java example fixtures building on CI and fixed small issues along the way to get it working. If you get yourself added to the Pinterest Github organization I can add you as a reviewer |
Will do. I am in the Pinterest Github organization now. |
@RicoYao - Please rebase master and resolve the conflicts when you get a chance. I just merged the changes for CI to build the java examples so you should see that when you rebase / update this PR 👍 |
Otherwise callers will always have to defend against null values, which is a big pain. We have isVARIABLESet() methods if developers want to check if a property was actually set or not.
9659f11
to
adfa6a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@RicoYao - I'll merge after CI passes |
Otherwise callers will always have to defend against null values, which is a big pain.
We have isVARIABLESet() methods if developers want to check if a property was actually set or not.