[ https://issues.apache.org/jira/browse/LUCENE-4413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Smiley resolved LUCENE-4413. ---------------------------------- Resolution: Fixed Fix Version/s: 4.0 Assignee: David Smiley Woops; forgot to attach the the patch. Here's the ViewVC URL to the commit: http://svn.apache.org/viewvc?view=revision&revision=1388872 Committed to trunk, 4x, and 4.0 branches > Better use of exceptions in spatial > ----------------------------------- > > Key: LUCENE-4413 > URL: https://issues.apache.org/jira/browse/LUCENE-4413 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/spatial > Reporter: David Smiley > Assignee: David Smiley > Priority: Minor > Fix For: 4.0 > > > Spatial4j's InvalidShapeException is supposed to be for shape strings that > won't parse or invalid coordinates. TwoDoublesStrategy is using it > incorrectly to indicate the strategy doesn't support the shape. > Perhaps UnsupportedOperationException is more fitting. I kind of prefer it > just slightly over IllegalArgumentException because I think of it here as > the strategy not supporting that shape. > The biggest point here is consistency across the strategies. > FYI for context there's also UnsupportedSpatialOperation, an Exception that > doesn't follow the naming convention but I'm ok with that. Its c'tor > mandates its association with an instance of SpatialOperation. So if a > strategy doesn't support an operation then it's got a special exception just > for that, but not also true for shape? Seems lopsided to me. I think my > preference is for this exception to be UnsupportedSpatialArgument that isn't > locked to either the shape or operation. > The attached patch doesn't go as far as UnsupportedSpatialArgument but it at > least bring consistent behavior. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org