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

Fix npe comparing empty points #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nigelsim
Copy link

I was encountering the following NPE when used with Hibernate/Spring Boot 3, which is being caused by a POINT EMPTY being passed as one of the parameters.

java.lang.NullPointerException: Cannot read field "x" because "c1" is null
	at org.geolatte.geom.jts.JTSUtils.equals3D(JTSUtils.java:56)
	at org.geolatte.geom.jts.JTSUtils.equals3DPrimitiveGeometries(JTSUtils.java:89)
	at org.geolatte.geom.jts.JTSUtils.equalsExact3D(JTSUtils.java:43)

Given this seems like valid input, I've put in some handling for this case, including a unit test.

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.

1 participant