Skip to content

Conversation

@ChenyuWang98
Copy link
Contributor

What's changed?

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment on lines +122 to +148
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.FeatureSource
newFullyQualifiedTypeName: org.geotools.api.data.FeatureSource
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.Query
newFullyQualifiedTypeName: org.geotools.api.data.Query
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.QueryCapabilities
newFullyQualifiedTypeName: org.geotools.api.data.QueryCapabilities
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.FeatureWriter
newFullyQualifiedTypeName: org.geotools.api.data.FeatureWriter
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.Transaction
newFullyQualifiedTypeName: org.geotools.api.data.Transaction
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.DataStoreFinder
newFullyQualifiedTypeName: org.geotools.api.data.DataStoreFinder
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.DataAccess
newFullyQualifiedTypeName: org.geotools.api.data.DataAccess
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.DataStore
newFullyQualifiedTypeName: org.geotools.api.data.DataStore
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.FileDataStoreFinder
newFullyQualifiedTypeName: org.geotools.api.data.FileDataStoreFinder
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if all of these can be replaced with

  - org.openrewrite.java.ChangePackage:
      oldPackageName: org.geotools.data
      newPackageName: org.geotools.data.api
      recursive: false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason why I list it this way is that what is not listed does not need to be modified.

Comment on lines +149 to +151
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.api.data.Join
newFullyQualifiedTypeName: org.geotools.data.Join
Copy link
Member

Choose a reason for hiding this comment

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

Judging by the others I'm seeing, isn't this the wrong way round?

Suggested change
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.api.data.Join
newFullyQualifiedTypeName: org.geotools.data.Join
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.geotools.data.Join
newFullyQualifiedTypeName: org.geotools.api.data.Join

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 might be the class I previously identified that didn't need modification; we can remove it for now.

Copy link
Member

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Thanks for sharing your recipe here @ChenyuWang98 . I do wonder if perhaps this would be better aimed as a contribution to https://github.com/geotools/geotools.

Quite a few projects similarly maintain their own recipes, as seen on:
https://docs.openrewrite.org/reference/community-recipes#projects

In this case I don't think GeoTools would fit in with the other recipes in rewrite-migrate-java, and perhaps doesn't quite meet the bar for us to spin up and maintain a separate repository for it.

Let us know what kind of feedback you get from GeoTools themselves, and we can reevaluate from there.

@timtebeek timtebeek marked this pull request as draft December 9, 2025 11:28
@ChenyuWang98
Copy link
Contributor Author

Okay, I'll ask the geotools project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants