You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Neil Ireson (Jira)" <ji...@apache.org> on 2021/02/10 08:32:00 UTC
[jira] [Updated] (LUCENE-9757) Repeated code in Polygon
[ https://issues.apache.org/jira/browse/LUCENE-9757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neil Ireson updated LUCENE-9757:
--------------------------------
Description:
In the constructor the following inequality check is repeated:
{code:java}
if (polyLats.length != polyLons.length) {
throw new IllegalArgumentException("polyLats and polyLons must be equal length");
}
{code}
Not sure if if's worth reporting such a trivial "bug" but perhaps the nanosecond saving is worth it for someone.
> Repeated code in Polygon
> ------------------------
>
> Key: LUCENE-9757
> URL: https://issues.apache.org/jira/browse/LUCENE-9757
> Project: Lucene - Core
> Issue Type: Bug
> Environment: In the constructor, the following inequality check is repeated:
> {code:java}
> if (polyLats.length != polyLons.length) {
> throw new IllegalArgumentException("polyLats and polyLons must be equal length");
> }
> {code}
> This almost seems too trivial to mention but the nanosecond time saving may be useful to someone.
> Reporter: Neil Ireson
> Priority: Minor
>
> In the constructor the following inequality check is repeated:
> {code:java}
> if (polyLats.length != polyLons.length) {
> throw new IllegalArgumentException("polyLats and polyLons must be equal length");
> }
> {code}
> Not sure if if's worth reporting such a trivial "bug" but perhaps the nanosecond saving is worth it for someone.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org