Replace no more maintained com.squareup:javapoet by#23455
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
b953518 to
d9e4791
Compare
com.palantir.javapoet:javapoet the squareup one was deprecated in 2020 and the repo has been archived in 2024 Palantir one is a fork of the squareup javapoet project. * maven coordinate adjusted * package name adjusted * few api change to use methods instead of attributes as they became private * fixed one method in our code thanks to stricter check introduced palantir/javapoet@04b6134 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
d9e4791 to
05ce454
Compare
|
🧪 CI tested the following changed modules:
✅ POM dependency changes: targeted tests included Changed properties: javapoet-version Modules affected by dependency changes (3)
All tested modules (12 modules)
|
gnodet
left a comment
There was a problem hiding this comment.
Good change. Replacing the archived com.squareup:javapoet (deprecated in 2020, archived in 2024) with the actively maintained Palantir fork (com.palantir.javapoet:javapoet) is the right move.
The migration looks correct:
- All import package renames (
com.squareup.javapoet->com.palantir.javapoet) are applied consistently across all three modules (servicenow-maven-plugin, yaml-dsl-maven-plugin, openapi-rest-dsl-generator). - The public-field-to-accessor-method changes (
TypeSpec.name->TypeSpec.name(),AnnotationSpec.members->AnnotationSpec.members()) are properly adapted -- the Palantir fork encapsulates state behind accessor methods instead of exposing public fields. - The removal of the unused
info.name().toString()arg from theaddMember("order", ...)call is correct -- the format string had no$placeholder, so the arg was always ignored by squareup javapoet. The Palantir fork is stricter and validates that all varargs are consumed, so this would have failed at runtime without the fix. Good catch. - License is Apache 2.0, fully compatible.
- CI checks all pass.
- Version 0.15.0 is the latest available release.
Two minor nits (non-blocking):
-
PR title truncated -- the title reads "Replace no more maintained com.squareup:javapoet by" and ends mid-sentence. Consider completing it, e.g., "Replace archived com.squareup:javapoet with com.palantir.javapoet".
-
Commit message -- same truncation issue. If the PR gets squash-merged, the commit message will be incomplete.
Claude Code on behalf of Guillaume Nodet
com.palantir.javapoet:javapoet
the squareup one was deprecated in 2020 and the repo has been archived in 2024
Palantir one is a fork of the squareup javapoet project.
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.