Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 77838 invoked from network); 21 Oct 2009 13:40:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 13:40:24 -0000 Received: (qmail 27797 invoked by uid 500); 21 Oct 2009 13:40:23 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 27738 invoked by uid 500); 21 Oct 2009 13:40:23 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 27730 invoked by uid 99); 21 Oct 2009 13:40:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 13:40:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 13:40:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 669BD234C045 for ; Wed, 21 Oct 2009 06:39:59 -0700 (PDT) Message-ID: <162639839.1256132399405.JavaMail.jira@brutus> Date: Wed, 21 Oct 2009 13:39:59 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1257) Port to Java5 In-Reply-To: <926927359.1207125024848.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1257?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D127= 68234#action_12768234 ]=20 Uwe Schindler commented on LUCENE-1257: --------------------------------------- Committed: - LUCENE-1257_more_unnecessary_casts.patch - Remove the rest of unchecked warnings. I added a TODO, where I do not und= erstand the code and not for sure know, whats inside the collections. This = could be fixed some time later. But the core code now compiles without any = unchecked warning. Revision: 828011 > Port to Java5 > ------------- > > Key: LUCENE-1257 > URL: https://issues.apache.org/jira/browse/LUCENE-1257 > Project: Lucene - Java > Issue Type: Improvement > Components: Analysis, Examples, Index, Other, Query/Scoring, Que= ryParser, Search, Store, Term Vectors > Affects Versions: 3.0 > Reporter: C=C3=A9dric Champeau > Assignee: Uwe Schindler > Priority: Minor > Fix For: 3.0 > > Attachments: instantiated_fieldable.patch, LUCENE-1257-BooleanQue= ry.patch, LUCENE-1257-BooleanScorer_2.patch, LUCENE-1257-BufferedDeletes_Do= cumentsWriter.patch, LUCENE-1257-CheckIndex.patch, LUCENE-1257-CloseableThr= eadLocal.patch, LUCENE-1257-CompoundFileReaderWriter.patch, LUCENE-1257-Con= currentMergeScheduler.patch, LUCENE-1257-DirectoryReader.patch, LUCENE-1257= -DisjunctionMaxQuery-more_type_safety.patch, LUCENE-1257-DocFieldProcessorP= erThread.patch, LUCENE-1257-Document.patch, LUCENE-1257-FieldCacheImpl.patc= h, LUCENE-1257-FieldCacheRangeFilter.patch, LUCENE-1257-IndexDeleter.patch,= LUCENE-1257-IndexDeletionPolicy_IndexFileDeleter.patch, LUCENE-1257-iw.pat= ch, LUCENE-1257-MTQWF.patch, LUCENE-1257-NormalizeCharMap.patch, LUCENE-125= 7-o.a.l.util.patch, LUCENE-1257-org_apache_lucene_document.patch, LUCENE-12= 57-org_apache_lucene_document.patch, LUCENE-1257-org_apache_lucene_document= .patch, LUCENE-1257-SegmentInfos.patch, LUCENE-1257-StringBuffer.patch, LUC= ENE-1257-StringBuffer.patch, LUCENE-1257-StringBuffer.patch, LUCENE-1257-To= pDocsCollector.patch, LUCENE-1257-WordListLoader.patch, LUCENE-1257_analysi= s.patch, LUCENE-1257_BooleanFilter_Generics.patch, LUCENE-1257_contrib_high= lighting.patch, LUCENE-1257_javacc_upgrade.patch, LUCENE-1257_messages.patc= h, LUCENE-1257_more_unnecessary_casts.patch, LUCENE-1257_MultiFieldQueryPar= ser.patch, LUCENE-1257_o.a.l.queryParser.patch, LUCENE-1257_o.a.l.store.pat= ch, LUCENE-1257_o_a_l_index_test.patch, LUCENE-1257_o_a_l_index_test.patch,= LUCENE-1257_o_a_l_search.patch, LUCENE-1257_o_a_l_search_spans.patch, LUCE= NE-1257_org_apache_lucene_index.patch, LUCENE-1257_org_apache_lucene_index.= patch, LUCENE-1257_queryParser_jj.patch, LUCENE-1257_unnecessary_casts.patc= h, lucene1257surround1.patch, lucene1257surround1.patch, shinglematrixfilte= r_generified.patch > > > For my needs I've updated Lucene so that it uses Java 5 constructs. I kno= w Java 5 migration had been planned for 2.1 someday in the past, but don't = know when it is planned now. This patch against the trunk includes : > - most obvious generics usage (there are tons of usages of sets, ... Thos= e which are commonly used have been generified) > - PriorityQueue generification > - replacement of indexed for loops with for each constructs > - removal of unnececessary unboxing > The code is to my opinion much more readable with those features (you act= ually *know* what is stored in collections reading the code, without the ne= ed to lookup for field definitions everytime) and it simplifies many algori= thms. > Note that this patch also includes an interface for the Query class. This= has been done for my company's needs for building custom Query classes whi= ch add some behaviour to the base Lucene queries. It prevents multiple unnn= ecessary casts. I know this introduction is not wanted by the team, but it = really makes our developments easier to maintain. If you don't want to use = this, replace all /Queriable/ calls with standard /Query/. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org