Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 14790 invoked from network); 2 Apr 2008 08:32:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2008 08:32:55 -0000 Received: (qmail 27298 invoked by uid 500); 2 Apr 2008 08:32:52 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 27141 invoked by uid 500); 2 Apr 2008 08:32:52 -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 27120 invoked by uid 99); 2 Apr 2008 08:32:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 01:32:51 -0700 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, 02 Apr 2008 08:32:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CF768234C0BC for ; Wed, 2 Apr 2008 01:30:24 -0700 (PDT) Message-ID: <926927359.1207125024848.JavaMail.jira@brutus> Date: Wed, 2 Apr 2008 01:30:24 -0700 (PDT) From: =?utf-8?Q?C=C3=A9dric_Champeau_=28JIRA=29?= To: java-dev@lucene.apache.org Subject: [jira] Created: (LUCENE-1257) Port to Java5 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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, Quer= yParser, Search, Store, Term Vectors Affects Versions: 2.3.1 Reporter: C=C3=A9dric Champeau Attachments: java5.patch For my needs I've updated Lucene so that it uses Java 5 constructs. I know = Java 5 migration had been planned for 2.1 someday in the past, but don't kn= ow when it is planned now. This patch against the trunk includes : - most obvious generics usage (there are tons of usages of sets, ... Those = 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 actua= lly *know* what is stored in collections reading the code, without the need= to lookup for field definitions everytime) and it simplifies many algorith= ms. Note that this patch also includes an interface for the Query class. This h= as been done for my company's needs for building custom Query classes which= add some behaviour to the base Lucene queries. It prevents multiple unnnec= essary casts. I know this introduction is not wanted by the team, but it re= ally makes our developments easier to maintain. If you don't want to use th= is, 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