Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 98657 invoked from network); 24 Mar 2011 18:29:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Mar 2011 18:29:47 -0000 Received: (qmail 92464 invoked by uid 500); 24 Mar 2011 18:29:46 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 92385 invoked by uid 500); 24 Mar 2011 18:29:46 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 92378 invoked by uid 99); 24 Mar 2011 18:29:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 18:29:46 +0000 X-ASF-Spam-Status: No, hits=-1999.7 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD,URIBL_RHS_DOB X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 18:29:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6EA354C3FE for ; Thu, 24 Mar 2011 18:29:06 +0000 (UTC) Date: Thu, 24 Mar 2011 18:29:06 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Message-ID: <1906710042.9032.1300991346449.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1459587950.8595.1300982345945.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-2990) Improve ArrayUtil/CollectionUtil.*Sort() methods to early-reaturn on empty or one-element lists/arrays MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010818#comment-13010818 ] Uwe Schindler commented on LUCENE-2990: --------------------------------------- Will do. Courier New is an ugly font :-) > Improve ArrayUtil/CollectionUtil.*Sort() methods to early-reaturn on empty or one-element lists/arrays > ------------------------------------------------------------------------------------------------------ > > Key: LUCENE-2990 > URL: https://issues.apache.org/jira/browse/LUCENE-2990 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Uwe Schindler > Assignee: Uwe Schindler > Priority: Trivial > Fix For: 3.2, 4.0 > > Attachments: LUCENE-2990.patch, LUCENE-2990.patch, LUCENE-2990.patch > > > It might be a good idea to make CollectionUtil or ArrayUtil return early if the passed-in list or array's length <= 1 because sorting is unneeded then. This improves maybe automaton or other places, as for empty or one-element lists no SorterTermplate is created. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org