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

[GEOS-11373] : Geometry type mismatch in WFS 1.1.0 #4773

Merged
merged 4 commits into from
May 27, 2024

Conversation

eropartz
Copy link
Contributor

@eropartz eropartz commented May 21, 2024

GEOS-11373 Powered by Pull Request Badge

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • There is an issue in GeoTools Jira (except for changes not visible to end users).
  • Commit message(s) must be in the form [GEOT-XYZW] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • The commit targets a single objective (if multiple focuses cannot be avoided, each one is in its own commit, and has a separate ticket describing it).

@jodygarnett
Copy link
Member

This seems an important fix, it requires a test case before I can review it?

@eropartz
Copy link
Contributor Author

Hi @jodygarnett , Unit test added

@@ -12969,7 +12970,7 @@ private static AttributeType build_MULTISURFACEPROPERTYTYPE_TYPE() {
AttributeType builtType =
new AttributeTypeImpl(
new NameImpl("http://www.opengis.net/gml", "MultiSurfacePropertyType"),
MultiSurface.class,
org.geotools.geometry.jts.MultiSurface.class,
Copy link
Member

Choose a reason for hiding this comment

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

Why use a fully qualified class when it is imported?

@aaime aaime merged commit ef25de6 into geotools:main May 27, 2024
21 checks passed
@aaime aaime added backport 30.x Backport bot will backport to 30.x on merge backport 31.x Automatic backport to 31.x branch labels May 27, 2024
@aaime
Copy link
Member

aaime commented May 27, 2024

The backport to 31.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git cherry-pick --skip'

stdout
[backport-4773-to-31.x 2617d9425a] Geometry type mismatch in WFS 1.1.0
 Author: ROPARTZ Erwan DTSI/DSI <erwan.ropartz@orange.com>
 Date: Tue May 21 15:06:05 2024 +0200
 1 file changed, 2 insertions(+), 2 deletions(-)
[backport-4773-to-31.x ed694c22c6] Replace org.geotools.gml3.MultiSurface by org.geotools.geometry.jts.MultiSurface
 Author: ROPARTZ Erwan DTSI/DSI <erwan.ropartz@orange.com>
 Date: Thu May 23 09:59:26 2024 +0200
 5 files changed, 30 insertions(+), 37 deletions(-)
 delete mode 100644 modules/extension/xsd/xsd-gml3/src/main/java/org/geotools/gml3/MultiSurface.java
[backport-4773-to-31.x 8eb8b9b468] remove fully qualified class name MultiSurface
 Author: ROPARTZ Erwan DTSI/DSI <erwan.ropartz@orange.com>
 Date: Thu May 23 16:59:45 2024 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
On branch backport-4773-to-31.x
You are currently cherry-picking commit c8298b15b2.
  (all conflicts fixed: run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

nothing to commit, working tree clean

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-31.x 31.x
# Navigate to the new working tree
cd .worktrees/backport-31.x
# Create a new branch
git switch --create backport-4773-to-31.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 5fdfba3124e009be72f0beb260c7c53cff7d2192,149af2ba19d1b05f69410a759f79bac06610b9cc,8d369eee8a561e88b16f827936292f9c4e34660a,c8298b15b236029cc12186482223b168fbd44ac3
# Push it to GitHub
git push --set-upstream origin backport-4773-to-31.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-31.x

Then, create a pull request where the base branch is 31.x and the compare/head branch is backport-4773-to-31.x.

@aaime
Copy link
Member

aaime commented May 27, 2024

The backport to 30.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git cherry-pick --skip'

stdout
[backport-4773-to-30.x ca4d7fbffd] Geometry type mismatch in WFS 1.1.0
 Author: ROPARTZ Erwan DTSI/DSI <erwan.ropartz@orange.com>
 Date: Tue May 21 15:06:05 2024 +0200
 1 file changed, 2 insertions(+), 2 deletions(-)
[backport-4773-to-30.x ee463f25be] Replace org.geotools.gml3.MultiSurface by org.geotools.geometry.jts.MultiSurface
 Author: ROPARTZ Erwan DTSI/DSI <erwan.ropartz@orange.com>
 Date: Thu May 23 09:59:26 2024 +0200
 5 files changed, 30 insertions(+), 37 deletions(-)
 delete mode 100644 modules/extension/xsd/xsd-gml3/src/main/java/org/geotools/gml3/MultiSurface.java
[backport-4773-to-30.x 640535777a] remove fully qualified class name MultiSurface
 Author: ROPARTZ Erwan DTSI/DSI <erwan.ropartz@orange.com>
 Date: Thu May 23 16:59:45 2024 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
On branch backport-4773-to-30.x
You are currently cherry-picking commit c8298b15b2.
  (all conflicts fixed: run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

nothing to commit, working tree clean

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-30.x 30.x
# Navigate to the new working tree
cd .worktrees/backport-30.x
# Create a new branch
git switch --create backport-4773-to-30.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 5fdfba3124e009be72f0beb260c7c53cff7d2192,149af2ba19d1b05f69410a759f79bac06610b9cc,8d369eee8a561e88b16f827936292f9c4e34660a,c8298b15b236029cc12186482223b168fbd44ac3
# Push it to GitHub
git push --set-upstream origin backport-4773-to-30.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-30.x

Then, create a pull request where the base branch is 30.x and the compare/head branch is backport-4773-to-30.x.

@aaime
Copy link
Member

aaime commented May 27, 2024

Automatic backports failed. Also a note, I had to make a change in the GeoSever "features-templating" community module as it depended on the class that has just been removed.

sweco-se1c8x pushed a commit to sweco-sepesd/geotools that referenced this pull request May 27, 2024
* Geometry type mismatch in WFS 1.1.0

* Replace org.geotools.gml3.MultiSurface by org.geotools.geometry.jts.MultiSurface

* remove fully qualified class name MultiSurface

* Relaunch CI

---------

Co-authored-by: ROPARTZ Erwan DTSI/DSI <erwan.ropartz@orange.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 30.x Backport bot will backport to 30.x on merge backport 31.x Automatic backport to 31.x branch failed backport
Projects
None yet
4 participants