Skip to content

Migrate to com.palantir.javapoet#902

Merged
iuliiasobolevska merged 1 commit intoNetflix:masterfrom
illegal:migrate-javapoet
Dec 11, 2025
Merged

Migrate to com.palantir.javapoet#902
iuliiasobolevska merged 1 commit intoNetflix:masterfrom
illegal:migrate-javapoet

Conversation

@illegal
Copy link
Copy Markdown
Contributor

@illegal illegal commented Dec 10, 2025

  • Replace com.squareup:javapoet dependency with the latest version (0.9.x) of com.palantir.javapoet:javapoet.
  • Update imports to use the new package names.
  • Use the accessor methods to get the field values from JavaPoet objects, rather than accessing those fields directly, as the fields are now marked as private in the respective Palantir's JavaPoet classes.
  • Use the builder wrapper object to access the current state of TypeSpec.Builder, as the builder classes no longer expose their internal state via public methods.
  • Use Object class name constant from ClassName class, as the similar constant in TypeName class no longer exists.
  • Make minor refactoring changes suggested by IntelliJ IDEA's code inspector tool.

- Replace `com.squareup:javapoet` dependency with the latest version
(0.9.x) of `com.palantir.javapoet:javapoet`.
- Update imports to use the new package names.
- Use the accessor methods to get the field values from JavaPoet
objects, rather than accessing those fields directly, as the fields are
now marked as private in the respective Palantir's JavaPoet classes.
- Use the builder wrapper object to access the current state of
`TypeSpec.Builder`, as the builder classes no longer expose their
internal state via public methods.
- Use Object class name constant from `ClassName` class, as the similar
constant in `TypeName` class no longer exists.
- Make minor refactoring changes suggested by IntelliJ IDEA's code
inspector tool.
@illegal
Copy link
Copy Markdown
Contributor Author

illegal commented Dec 10, 2025

Resolves #825 and unblocks #167.

@paulbakker
Copy link
Copy Markdown
Collaborator

This is great @illegal, thanks! We'll do some testing on our repos

@iuliiasobolevska iuliiasobolevska merged commit 8d15daf into Netflix:master Dec 11, 2025
6 checks passed
@paulbakker
Copy link
Copy Markdown
Collaborator

@illegal we tested this change on 100+ repos and didn't see issues, so we went ahead and merged. Thanks again for this work!

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