Hi Karl, This commit broke the build because code formatting was off (this was fixed in a subsequent, unrelated commit).
I spent some time looking for the issue to check what happened and couldn't find it anywhere. Github's PR infrastructure makes it quite convenient to ensure everything passes before it's merged and it leaves a handy place to add comments in case something doesn't work - I highly recommend it. Dawid On Thu, Nov 17, 2022 at 2:19 AM <kwri...@apache.org> wrote: > This is an automated email from the ASF dual-hosted git repository. > > kwright pushed a commit to branch main > in repository https://gitbox.apache.org/repos/asf/lucene.git > > > The following commit(s) were added to refs/heads/main by this push: > new b6ebfd18610 Prevent NPEs while still handling the polar case for > horizontal planes right off the pole > b6ebfd18610 is described below > > commit b6ebfd18610c482109c6a38b2327254848508f03 > Author: Karl David Wright <kwri...@apache.org> > AuthorDate: Wed Nov 16 11:03:24 2022 -0500 > > Prevent NPEs while still handling the polar case for horizontal planes > right off the pole > --- > .../java/org/apache/lucene/spatial3d/geom/Plane.java | 20 > ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git > a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java > b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java > index ef9e9773223..9b46c3553bf 100755 > --- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java > +++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java > @@ -1500,9 +1500,14 @@ public class Plane extends Vector { > } else { > // Since a==b==0, any plane including the Z axis suffices. > // System.err.println(" Perpendicular to z"); > - final GeoPoint[] points = > + GeoPoint[] points = > findIntersections(planetModel, normalYPlane, NO_BOUNDS, > NO_BOUNDS); > - if (points.length > 0) { > + if (points.length == 0) { > + points = findIntersections(planetModel, normalXPlane, > NO_BOUNDS, NO_BOUNDS); > + } > + if (points.length == 0) { > + boundsInfo.addZValue(new GeoPoint(0.0, 0.0, -this.z)); > + } else { > boundsInfo.addZValue(points[0]); > } > } > @@ -2042,9 +2047,16 @@ public class Plane extends Vector { > } > } else { > // Horizontal circle. Since a==b, any vertical plane suffices. > - final GeoPoint[] points = > + GeoPoint[] points = > findIntersections(planetModel, normalXPlane, NO_BOUNDS, > NO_BOUNDS); > - boundsInfo.addZValue(points[0]); > + if (points.length == 0) { > + points = findIntersections(planetModel, normalYPlane, > NO_BOUNDS, NO_BOUNDS); > + } > + if (points.length == 0) { > + boundsInfo.addZValue(new GeoPoint(0.0, 0.0, -this.z)); > + } else { > + boundsInfo.addZValue(points[0]); > + } > } > // System.err.println("Done latitude bounds"); > } > >