Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB19318F95 for ; Fri, 29 May 2015 01:04:25 +0000 (UTC) Received: (qmail 842 invoked by uid 500); 29 May 2015 01:04:23 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 784 invoked by uid 500); 29 May 2015 01:04:23 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 760 invoked by uid 99); 29 May 2015 01:04:23 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2015 01:04:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3AF26C96CB for ; Fri, 29 May 2015 01:04:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id bchYMFlf1wMD for ; Fri, 29 May 2015 01:04:14 +0000 (UTC) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 94E7B24CEB for ; Fri, 29 May 2015 01:04:14 +0000 (UTC) Received: by obew15 with SMTP id w15so46731116obe.1 for ; Thu, 28 May 2015 18:04:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=BrIn06bp66wPDb0dAcFR16bDR3UEKHsyR2y/t6mh+ZM=; b=K9hVFeoyb63UqRoUl7fe7QVnmYp9+sQ+HPItDQnL+uNRAZ9v/gZjZJBSaoexQSdDV2 fg7/y480HLWe2lcRYKLD5tix1QYy9E/vsI8cb2VKcGlYTIiLkeiveziYk6dP12U//KSn N7a5nl50+xPRiqXS7sYyQLUaL3gsrzfi7hQnLtQuPm131LywaekjHlgwL3i2FCMuDpyv e+Ht1DsX/CR1kzFPf8gV65hKiYFtxVMP8yo7OKiinqCVQhw8rt24HmZD9bdGEUW4hJVV ytecWI54ld6+Xhu6pGHfuS1zI2wHgDoFgTGcNk/h3a2I1U09j/ODD/23fElstREmPi47 HXlQ== X-Gm-Message-State: ALoCoQlPDxKiDd/dWJPQoZu2I4EQ/l6/yk8r0n8ndcFoJ4Zm6cbQRGvJTy8npL0KmvDyNIm5RFRf X-Received: by 10.60.39.65 with SMTP id n1mr4893451oek.31.1432861453909; Thu, 28 May 2015 18:04:13 -0700 (PDT) Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com. [209.85.214.176]) by mx.google.com with ESMTPSA id m19sm2150962oik.5.2015.05.28.18.04.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 18:04:13 -0700 (PDT) Received: by obew15 with SMTP id w15so46730884obe.1 for ; Thu, 28 May 2015 18:04:12 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.106.12 with SMTP id gq12mr1236226obb.74.1432861452967; Thu, 28 May 2015 18:04:12 -0700 (PDT) Received: by 10.202.187.66 with HTTP; Thu, 28 May 2015 18:04:12 -0700 (PDT) Date: Fri, 29 May 2015 11:04:12 +1000 Message-ID: Subject: Specifying a Version vs. not specifying a Version From: Trejkaz To: Lucene Users Mailing List Content-Type: text/plain; charset=UTF-8 Hi all. I know with older Lucene there was a recommendation never to use Version.CURRENT because it would break backwards compatibility. So we changed all our code over to call, for instance, new StandardTokenizer(Version.LUCENE_36, createReader()). Now StandardTokenizer(Version, Reader) is deprecated and the docs say to use StandardTokenizer(Reader) instead. But I can't do that, because that constructor hardcodes Version.LATEST, which will break backwards compatibility in the future (its Javadoc even confirms that this is the case.) So the Javadoc / deprecation is a bit inconsistent. For consistency, if Version.LATEST is going to have a scary warning like that on it, *it* should be deprecated. All the constructors which use it should also be deprecated and the constructors taking an explicit Version should be undeprecated. Otherwise, we have to call deprecated constructors and risk that some well-meaning developer in the future will "helpfully" remove all the deprecated calls to Lucene, calling the dangerous ones instead. TX --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org