Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 47384 invoked from network); 16 Jul 2008 13:44:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jul 2008 13:44:58 -0000 Received: (qmail 32661 invoked by uid 500); 16 Jul 2008 13:44:56 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 32623 invoked by uid 500); 16 Jul 2008 13:44:55 -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 32614 invoked by uid 99); 16 Jul 2008 13:44:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2008 06:44:55 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dmsmith555@gmail.com designates 209.85.200.170 as permitted sender) Received: from [209.85.200.170] (HELO wf-out-1314.google.com) (209.85.200.170) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2008 13:44:02 +0000 Received: by wf-out-1314.google.com with SMTP id 28so5453933wfc.20 for ; Wed, 16 Jul 2008 06:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=z1+doPiOSLZuXL2HhlV+qwZuHQsjAObPjA4iWkqg8BY=; b=PJ1Jdu2+nQoWJ/dD0p2kyLjVMXm2BZZr/Bt3wussKydDAKaTjlUgkWraPaf24Wdj1Z J69kQ8Zy0AAnoohPnDhc0xb+FX3j9jEPXqoZs7RHPY5gJiNYkHUxzFYD3Nv25smcafL8 QtYOpKR6nIsGd+XWUdZc/cpIhsQQZ+h+Z80FM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=rGynNcwOVsjPcdnNE9T2KUVQLq+gqZfEIaPjmlNtDvA9fsV9S9Z2Uw96nFmOxAgY1+ n7i7nNdpxedtl9U+TqttOurgKhboIN37WUFMF/SvmFujgecBxt3LmfqIDrFeMRtySb+e ovypMTTiQkoXQK5TQs3Gwm2b1iyY21jft31tI= Received: by 10.142.251.9 with SMTP id y9mr32155wfh.46.1216215867070; Wed, 16 Jul 2008 06:44:27 -0700 (PDT) Received: from localhost.localdomain ( [67.39.27.222]) by mx.google.com with ESMTPS id 34sm9861816yxm.0.2008.07.16.06.44.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 16 Jul 2008 06:44:26 -0700 (PDT) Message-ID: <487DFB39.5000909@gmail.com> Date: Wed, 16 Jul 2008 09:44:25 -0400 From: DM Smith User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: TokenStream problem? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org According to the documentation for TokenStream, derived classes are to override either next() or next(Token). Currently, if next(Token) is overridden, but next() is called, payload is cloned if it exists in the new token. However, if next(Token) is called, it is up to the implementation to properly maintain payload. It seems to me that since next(Token) is called with a new Token(), that this should not be necessary. Also, if next() is overridden, but next(Token) is called, then payload is never cloned, unless the overriding method handles it. Can someone explain to me why this is correct? -- DM --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org