Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 3976 invoked from network); 13 Oct 2009 08:48:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Oct 2009 08:48:13 -0000 Received: (qmail 24564 invoked by uid 500); 13 Oct 2009 08:47:33 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 24492 invoked by uid 500); 13 Oct 2009 08:47:33 -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 24484 invoked by uid 99); 13 Oct 2009 08:47:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2009 08:47:33 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [85.25.71.29] (HELO mail.troja.net) (85.25.71.29) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2009 08:47:28 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 6BB31D36004 for ; Tue, 13 Oct 2009 10:47:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.troja.net Received: from mail.troja.net ([127.0.0.1]) by localhost (megaira.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Thecma-T5hm0 for ; Tue, 13 Oct 2009 10:46:56 +0200 (CEST) Received: from VEGA (port-83-236-62-3.dynamic.qsc.de [83.236.62.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTPSA id 1C1BDD36003 for ; Tue, 13 Oct 2009 10:46:56 +0200 (CEST) From: "Uwe Schindler" To: References: <20091013065940.CF6B72388904@eris.apache.org> <77964A755346425797B1F809C4514B6C@VEGA> <4AD42B7A.5000902@gmail.com> <4AD42C94.2060608@gmail.com> <4E8D265BF2904BAFBC9FF63EE8BC5039@VEGA> <4AD43710.6080805@gmail.com> <7238CD36D28247A3901723AAA0523E70@VEGA> <4AD43BDF.6040007@gmail.com> Subject: RE: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java Date: Tue, 13 Oct 2009 10:46:56 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0009_01CA4BF2.7C313950" X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4AD43BDF.6040007@gmail.com> Thread-Index: AcpL4HYfEkKsAs6ES8aO+NRQ/gbnXQAAOmyA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 ------=_NextPart_000_0009_01CA4BF2.7C313950 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Yes. In change from 2.9 to 3.0 the tests are only because of drop-in replacement. And of course, if some old test uses deprecated APIs we should fix them also in backwards, otherwise we had to remove half of the test (e.g. IndexWriter/Reader ctor hell). In this case the tests in trunk and BW were the same, so no real need to fix in BW. Good night! I am starting now ith removing deprecated sort logic and lots of comparators in search. Hard work :-( Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de _____ From: Michael Busch [mailto:buschmic@gmail.com] Sent: Tuesday, October 13, 2009 10:36 AM To: java-dev@lucene.apache.org Subject: Re: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucen e/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java OK that works too. 'ant test-tag' passes for me after 'svn up'. Well we don't only want to test drop-in jar replacement but especially also runtime backwards-compatibility. So in general removing checks is not ok IMO. E.g. if we made now a big change in trunk that accidentally changes runtime behavior then such a check you just removed might discover it. But in this case it's ok I think, because we're switching from 2.9->3.0 and are not adding any new features. Thanks again... going to bed now. Michael On 10/13/09 1:22 AM, Uwe Schindler wrote: Yes, I did this exactly, but a little bit simplier: I just removed the deprecated code from the TestFieldMaskingSpanQuery, as it is tested by trunk tests. Modifying backwards because of this is not really needed, as it is mainly for testing drop-in jar replacement (e.g. no incorrect method signatures because of generics and so on). Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de _____ From: Michael Busch [mailto:buschmic@gmail.com] Sent: Tuesday, October 13, 2009 10:15 AM To: java-dev@lucene.apache.org Subject: Re: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucen e/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java Yeah please go ahead! Thanks for fixing. I have it hear working too now - I just took the lucene_2_9_back_compat_tests_20091011 tag and made only the fix to TestFieldMaskingSpanQuery (without Java 1.5 code of course ;) ) and *not* the changes to JustCompileSearchSpans and test-tag is passing now against current trunk. I think that's the same you have now, right? Please go ahead and commit... today is not my day - I should go to bed :) Michael On 10/13/09 1:05 AM, Uwe Schindler wrote: Hi Michael, I fixed it here, should I commit? You problem was maybe that you thought, the backwards test code must compile against trunk. But it's vice versa. I reverted everything and only removed the getTerms() checks in the backwards branch. Now it works and the backwards testing is correct. Here the general rule applied: The backwards test code was checking against a deprecated API, just remove it. No need to rewrite the test for that. It is tested by the main tests. The main case of the backwards branch is to test drop in binary compatibility. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de -----Original Message----- From: Uwe Schindler [mailto:uwe@thetaphi.de] Sent: Tuesday, October 13, 2009 9:49 AM To: java-dev@lucene.apache.org Subject: RE: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luc ene/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java I found the reason why it broke: You changed in the backwards branch main code in your first commit the following: + Set terms = new HashSet(); + qr.extractTerms(terms); + assertEquals(1, terms.size()); And the backwards branch core and test is compiled with Java 1.4 - bumm. So general rule: Never change the main code branch, only the tests in backwards and use where possible only the old *public* API. If you have to change the main code you have a backwards break. If you only test some internal implementations in 2.9 (not public API), remove the tests in 2.9. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de -----Original Message----- From: Uwe Schindler [mailto:uwe@thetaphi.de] Sent: Tuesday, October 13, 2009 9:43 AM To: java-dev@lucene.apache.org Subject: RE: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luc ene/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java Yes, thats why we do the tests. By this it is possible to test compiled Java 1.4 code against new Java 1.5 lucene core with generics and test, that no upper generics boundaries (e.g. by things like ) are violated. But if you rewrite the tests to only use the API of lucene 3.0 and no deprecated methods it should pass and it has no effect, if an additional deprecated method is still available in the branch's code. If we have to remove all deprecated code also from the backwards branch, we would not need the branch at all. So this commit is definitely not needed (and I tested it, it works without). In the backwards branch we should only fix the tests, never the core code. If we do it, it is contra-productive. There were some edge cases, when we have backwards-incompatible changes in 2.9. But this is definitely not a backwards break. ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de -----Original Message----- From: Michael Busch [mailto:buschmic@gmail.com] Sent: Tuesday, October 13, 2009 9:30 AM To: java-dev@lucene.apache.org Subject: Re: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luc ene/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java Yes that's indeed the case, see LUCENE-1529. Michael On 10/13/09 12:25 AM, Michael Busch wrote: It was weird - I ran all the tests before I did the previous commit and it worked fine. Then after committing I wanted to doublecheck by running 'ant test-tag' and got the compile errors. I think something is wrong with my eclipse and/or svn. But I also switched from tortoise to command-line recently - so maybe I'm just clumsy. Anyway, the new tag is working now, sorry for the noise. To your question: Wasn't there a fix recently to test-tag to test drop-in backwards-compatibility? Which means that it compiles the tests first against the sources of the back-compat branch, but then runs them against the new trunk JAR? That's why this commit is necessary I think. Michael On 10/13/09 12:18 AM, Uwe Schindler wrote: I wonder why this commit is needed. It only affects the core classes, not th tests. To compile correct backwards tests it should not be important if the methods exist or not. ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de -----Original Message----- From: buschmi@apache.org [mailto:buschmi@apache.org] Sent: Tuesday, October 13, 2009 9:00 AM To: java-commits@lucene.apache.org Subject: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luc ene/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java Author: buschmi Date: Tue Oct 13 06:59:40 2009 New Revision: 824611 URL: http://svn.apache.org/viewvc?rev=824611 &view=rev Log: More fixes that were accidentially left out in the previous commit Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/FieldMaskingSpanQuery.java lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanFirstQuery.java lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNearQuery.java lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNotQuery.java lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanOrQuery.java Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/FieldMaskingSpanQuery.java URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_t ests/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java?re v=824611&r1=824610&r2=824611&view=diff ========================================================================== ==== --- lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/FieldMaskingSpanQuery.java (original) +++ lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/FieldMaskingSpanQuery.java Tue Oct 13 06:59:40 2009 @@ -94,11 +94,6 @@ return maskedQuery.getSpans(reader); } - /** @deprecated use {@link #extractTerms(Set)} instead. */ - public Collection getTerms() { - return maskedQuery.getTerms(); - } - public void extractTerms(Set terms) { maskedQuery.extractTerms(terms); } Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanFirstQuery.java URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_t ests/src/java/org/apache/lucene/search/spans/SpanFirstQuery.java?rev=82461 1&r1=824610&r2=824611&view=diff ========================================================================== ==== --- lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanFirstQuery.java (original) +++ lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanFirstQuery.java Tue Oct 13 06:59:40 2009 @@ -47,12 +47,6 @@ public String getField() { return match.getField(); } - /** Returns a collection of all terms matched by this query. - * @deprecated use extractTerms instead - * @see #extractTerms(Set) - */ - public Collection getTerms() { return match.getTerms(); } - public String toString(String field) { StringBuffer buffer = new StringBuffer(); buffer.append("spanFirst("); Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNearQuery.java URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_t ests/src/java/org/apache/lucene/search/spans/SpanNearQuery.java?rev=824611 &r1=824610&r2=824611&view=diff ========================================================================== ==== --- lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNearQuery.java (original) +++ lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNearQuery.java Tue Oct 13 06:59:40 2009 @@ -80,20 +80,6 @@ public String getField() { return field; } - /** Returns a collection of all terms matched by this query. - * @deprecated use extractTerms instead - * @see #extractTerms(Set) - */ - public Collection getTerms() { - Collection terms = new ArrayList(); - Iterator i = clauses.iterator(); - while (i.hasNext()) { - SpanQuery clause = (SpanQuery)i.next(); - terms.addAll(clause.getTerms()); - } - return terms; - } - public void extractTerms(Set terms) { Iterator i = clauses.iterator(); while (i.hasNext()) { Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNotQuery.java URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_t ests/src/java/org/apache/lucene/search/spans/SpanNotQuery.java?rev=824611& r1=824610&r2=824611&view=diff ========================================================================== ==== --- lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNotQuery.java (original) +++ lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanNotQuery.java Tue Oct 13 06:59:40 2009 @@ -49,12 +49,6 @@ public String getField() { return include.getField(); } - /** Returns a collection of all terms matched by this query. - * @deprecated use extractTerms instead - * @see #extractTerms(Set) - */ - public Collection getTerms() { return include.getTerms(); } - public void extractTerms(Set terms) { include.extractTerms(terms); } public String toString(String field) { Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanOrQuery.java URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_t ests/src/java/org/apache/lucene/search/spans/SpanOrQuery.java?rev=824611&r 1=824610&r2=824611&view=diff ========================================================================== ==== --- lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanOrQuery.java (original) +++ lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/luce ne/search/spans/SpanOrQuery.java Tue Oct 13 06:59:40 2009 @@ -58,20 +58,6 @@ public String getField() { return field; } - /** Returns a collection of all terms matched by this query. - * @deprecated use extractTerms instead - * @see #extractTerms(Set) - */ - public Collection getTerms() { - Collection terms = new ArrayList(); - Iterator i = clauses.iterator(); - while (i.hasNext()) { - SpanQuery clause = (SpanQuery)i.next(); - terms.addAll(clause.getTerms()); - } - return terms; - } - public void extractTerms(Set terms) { Iterator i = clauses.iterator(); while (i.hasNext()) { ------------------------------------------------------------------- -- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org ------=_NextPart_000_0009_01CA4BF2.7C313950 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Yes. In change = from 2.9 to 3.0 the tests are only because of drop-in replacement. And of course, = if some old test uses deprecated APIs we should fix them also in backwards, otherwise we had to remove half of the test (e.g. IndexWriter/Reader = ctor hell).

 =

In this case the = tests in trunk and BW were the same, so no real need to fix in = BW.

 =

Good night! I am = starting now ith removing deprecated sort logic and lots of comparators in = search. Hard work L

 =

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


From: Michael Busch = [mailto:buschmic@gmail.com]
Sent: Tuesday, October = 13, 2009 10:36 AM
To: java-dev@lucene.apache.org
Subject: Re: svn commit: r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lu= cene/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java

 

OK that works too. 'ant test-tag' passes for = me after 'svn up'.

Well we don't only want to test drop-in jar replacement but especially = also runtime backwards-compatibility. So in general removing checks is not ok = IMO. E.g. if we made now a big change in trunk that accidentally changes = runtime behavior then such a check you just removed might discover it. But in = this case it's ok I think, because we're switching from 2.9->3.0 and are not = adding any new features.

Thanks again... going to bed now.

 Michael

On 10/13/09 1:22 AM, Uwe Schindler wrote:

Yes, I did this exactly, but a little bit simplier: I = just removed the deprecated code from the TestFieldMaskingSpanQuery, as it is = tested by trunk tests. Modifying backwards because of this is not really = needed, as it is mainly for testing drop-in jar replacement (e.g. no incorrect method signatures because of generics and so = on).

 

Uwe<= /span>

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


From: Michael Busch [mailto:buschmic@gmail.com]
Sent: Tuesday, October = 13, 2009 10:15 AM
To: java-dev@lucene.apache.org=
Subject: Re: svn commit: = r824611 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lu= cene/search/spans: FieldMaskingSpanQuery.java SpanFirstQuery.java SpanNearQuery.java SpanNotQuery.java SpanOrQuery.java

 

Yeah please go ahead! Thanks for fixing.

I have it hear working too now - I just took the lucene_2_9_back_compat_tests_20091011 tag and made only the fix to TestFieldMaskingSpanQuery (without Java 1.5 code of course ;) ) and = *not* the changes to JustCompileSearchSpans and test-tag is passing now against = current trunk. I think that's the same you have now, right?

Please go ahead and commit... today is not my day - I should go to bed = :)

 Michael


On 10/13/09 1:05 AM, Uwe Schindler wrote: =

Hi =
Michael,
 
I fixed it here, should I =
commit?
 
You problem was maybe that you thought, the =
backwards test code must =
compile
against trunk. But it's vice versa. I =
reverted everything and only =
removed
the getTerms() checks in the backwards =
branch. Now it works and =
the
backwards testing is =
correct.
 
Here the general rule applied: The backwards =
test code was checking =
against
a deprecated API, just remove it. No need to =
rewrite the test for that. =
It
is tested by the main tests. The main case of =
the backwards branch is =
to
test drop in binary =
compatibility.
 
Uwe
 
-----
Uwe =
Schindler
H.-H.-Meier-Allee 63, D-28213 =
Bremen
http://www.thetaphi.de=
eMail: uwe@thetaphi.de=
 
 
  =
-----Original =
Message-----
From: Uwe Schindler [mailto:uwe@thetaphi.de]
Sent: Tuesday, October 13, 2009 9:49 =
AM
To: java-dev@lucene.apache.org
Subject: RE: svn commit: r824611 - =
in
/lucene/java/branches/lucene_2_9_back_compat_t=
ests/src/java/org/apache/luc
<= pre>ene/search/spans: FieldMaskingSpanQuery.java = SpanFirstQuery.java
SpanNearQuery.java SpanNotQuery.java =
SpanOrQuery.java
 
I found the reason why it =
broke:
 
You changed in the backwards branch main code =
in your first commit =
the
following:
 
+    Set<Term> terms =3D =
new =
HashSet<Term>();
+    =
qr.extractTerms(terms);
<=
font
size=3D2 color=3Dblack face=3D"Courier New">+    assertEquals(1, =
terms.size());
 
And the backwards branch core and test is =
compiled with Java 1.4 - =
bumm.
So
=
general rule: Never change the main code =
branch, only the tests =
in
backwards
and use where possible only the old *public* =
API. If you have to =
change
the
main code you have a backwards break. If you =
only test some =
internal
implementations in 2.9 (not public API), =
remove the tests in =
2.9.
 
Uwe
 
-----
Uwe =
Schindler
H.-H.-Meier-Allee 63, D-28213 =
Bremen
http://www.thetaphi.de=
eMail: uwe@thetaphi.de=
 
 
    =
-----Original =
Message-----
From: Uwe Schindler [mailto:uwe@thetaphi.de]
Sent: Tuesday, October 13, 2009 9:43 =
AM
To: java-dev@lucene.apache.org
Subject: RE: svn commit: r824611 - =
in
 
      =
/lucene/java/branches/lucene_2_9_back_compat_t=
ests/src/java/org/apache/luc
<= pre>    =
ene/search/spans: FieldMaskingSpanQuery.java =
SpanFirstQuery.java
SpanNearQuery.java SpanNotQuery.java =
SpanOrQuery.java
 
Yes, thats why we do the tests. By this it is =
possible to test =
compiled
Java
1.4 code against new Java 1.5 lucene core =
with generics and test, =
that
      =
no
=
    =
upper generics boundaries (e.g. by things =
like <? extends =
Something>)
      =
are
    =
violated.
 
But if you rewrite the tests to only use the =
API of lucene 3.0 and =
no
deprecated methods it should pass and it has =
no effect, if an =
additional
deprecated method is still available in the =
branch's code. If we have =
to
remove all deprecated code also from the =
backwards branch, we would =
not
need
the branch at all. So this commit is =
definitely not needed (and I =
tested
it,
it works without). In the backwards branch we =
should only fix the =
tests,
never the core code. If we do it, it is =
contra-productive.
 
There were some edge cases, when we have =
backwards-incompatible =
changes
      =
in
=
    =
2.9. But this is definitely not a backwards =
break.
 
-----
Uwe =
Schindler
H.-H.-Meier-Allee 63, D-28213 =
Bremen
http://www.thetaphi.de=
eMail: uwe@thetaphi.de=
 
      =
-----Original =
Message-----
From: Michael Busch [mailto:buschmic@gmail.com]
Sent: Tuesday, October 13, 2009 9:30 =
AM
To: java-dev@lucene.apache.org
Subject: Re: svn commit: r824611 - =
in
 
        =
 
      =
/lucene/java/branches/lucene_2_9_back_compat_t=
ests/src/java/org/apache/luc
<= pre>    =
ene/search/spans: FieldMaskingSpanQuery.java =
SpanFirstQuery.java
SpanNearQuery.java SpanNotQuery.java =
SpanOrQuery.java
 
Yes that's indeed the case, see =
LUCENE-1529.
 
  =
Michael
 
On 10/13/09 12:25 AM, Michael Busch =
wrote:
        =
It was weird - I ran all the tests before I =
did the previous =
commit
and it worked fine. Then after committing I =
wanted to doublecheck =
by
running 'ant test-tag' and got the compile =
errors.
 
I think something is wrong with my eclipse =
and/or svn. But I =
also
switched from tortoise to command-line =
recently - so maybe I'm =
just
clumsy. Anyway, the new tag is working now, =
sorry for the =
noise.
 
To your question: Wasn't there a fix recently =
to test-tag to =
test
drop-in backwards-compatibility? Which means =
that it compiles =
the
tests first against the sources of the =
back-compat branch, but =
then
runs them against the new trunk JAR? That's =
why this commit is
necessary I =
think.
 
 =
Michael
 
On 10/13/09 12:18 AM, Uwe Schindler =
wrote:
       &nbs=
p;  
I wonder why this commit is needed. It only =
affects the core
       &nbs=
p;    =
classes,=
    =
not =
th
tests. To compile correct backwards tests it =
should not be
       &nbs=
p;    =
important
    =
if =
the
methods exist or =
not.
 
-----
Uwe =
Schindler
H.-H.-Meier-Allee 63, D-28213 =
Bremen
http://www.thetaphi.de=
eMail: uwe@thetaphi.de=
 
 
       &nbs=
p;    
-----Original =
Message-----
From: buschmi@apache.org [mailto:buschmi@apache.org]
Sent: Tuesday, October 13, 2009 9:00 =
AM
To: java-commits@lucene.apache.org
Subject: svn commit: r824611 - =
in
 
       &nbs=
p;      =
 
        =
 
      =
/lucene/java/branches/lucene_2_9_back_compat_t=
ests/src/java/org/apache/luc
<= pre>    =
 
ene/search/spans: FieldMaskingSpanQuery.java =
SpanFirstQuery.java
SpanNearQuery.java SpanNotQuery.java =
SpanOrQuery.java
 
Author: =
buschmi
Date: Tue Oct 13 06:59:40 =
2009
New Revision: =
824611
 
URL: http://svn.apache.org/viewvc?rev=3D824611&view=
=3Drev
Log:
More fixes that were accidentially left out =
in the previous =
commit
 
Modified:
 
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/FieldMaskingSpanQuery.java
 
 
       &nbs=
p;      =
 
 =
       =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanFirstQuery.java
 
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNearQuery.java
 
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNotQuery.java=
 
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanOrQuery.java<=
o:p>
 
Modified:
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/FieldMaskingSpanQuery.java
URL:
 
       &nbs=
p;      =
 
        =
 
      =
http://svn.apache.org/viewvc/lucene/java/branches/=
lucene_2_9_back_compat_t
<= pre>    =
 
 
       &nbs=
p;      =
 
 =
       =
 
      =
ests/src/java/org/apache/lucene/search/spans/F=
ieldMaskingSpanQuery.java?re
<= pre>    =
 
v=3D824611&r1=3D824610&r2=3D824611&=
;view=3Ddiff
 
       &nbs=
p;      =
 
        =
 
      =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
=
    =
 
=3D=3D=3D=3D
---
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/FieldMaskingSpanQuery.java =
(original)
+++
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/FieldMaskingSpanQuery.java =
Tue Oct 13 =
06:59:40
       &nbs=
p;      =
2009
    =
@@ -94,11 +94,6 =
@@
      return =
maskedQuery.getSpans(reader);
=
    =
}
 
-  /** @deprecated use {@link =
#extractTerms(Set)} instead. =
*/
-  public Collection getTerms() =
{
-    return =
maskedQuery.getTerms();
<=
font
size=3D2 color=3Dblack face=3D"Courier New">-  =
}
-
<= pre>    public void = extractTerms(Set terms) = {
      =
maskedQuery.extractTerms(terms);
    =
}
 
Modified:
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanFirstQuery.java
URL:
 
       &nbs=
p;      =
 
        =
 
      =
http://svn.apache.org/viewvc/lucene/java/branches/=
lucene_2_9_back_compat_t
<= pre>    =
 
 
       &nbs=
p;      =
 
        =
 
      =
ests/src/java/org/apache/lucene/search/spans/S=
panFirstQuery.java?rev=3D82461
    =
 
1&r1=3D824610&r2=3D824611&view=3Dd=
iff
 
       &nbs=
p;      =
 
        =
 
      =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
=
    =
 
=3D=3D=3D=3D
---
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanFirstQuery.java =
(original)
+++
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanFirstQuery.java Tue Oct =
13 06:59:40 2009
@@ -47,12 +47,6 =
@@
 
    public String getField() { =
return match.getField(); =
}
 
-  /** Returns a collection of all terms =
matched by this =
query.
-   * @deprecated use extractTerms =
instead
-   * @see =
#extractTerms(Set)
-   =
*/
-  public Collection getTerms() { return =
match.getTerms(); =
}
-
<= pre>    public String = toString(String field) = {
      StringBuffer =
buffer =3D new =
StringBuffer();
      =
buffer.append("spanFirst(");
 
Modified:
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNearQuery.java
URL:
 
       &nbs=
p;     =
 
 
        =
 
      =
http://svn.apache.org/viewvc/lucene/java/branches/=
lucene_2_9_back_compat_t
<= pre>    =
 
 
       &nbs=
p;      =
 
        =
 
      =
ests/src/java/org/apache/lucene/search/spans/S=
panNearQuery.java?rev=3D824611
    =
 
&r1=3D824610&r2=3D824611&view=3Ddi=
ff
 
       &nbs=
p;      =
 
        =
 
      =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
=
    =
 
=3D=3D=3D=3D
---
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNearQuery.java =
(original)
+++
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNearQuery.java Tue Oct 13 =
06:59:40 2009
@@ -80,20 +80,6 =
@@
 
    public String getField() { =
return field; }
 
-  /** Returns a collection of all terms =
matched by this =
query.
-   * @deprecated use extractTerms =
instead
-   * @see =
#extractTerms(Set)
-   =
*/
-  public Collection getTerms() =
{
-    Collection terms =3D new =
ArrayList();
-    Iterator i =3D =
clauses.iterator();
-    while (i.hasNext()) =
{
-      SpanQuery =
clause =3D =
(SpanQuery)i.next();
-      =
terms.addAll(clause.getTerms());
-    =
}
-    return =
terms;
-  =
}
-
<= pre>    public void = extractTerms(Set terms) = {
       &nbs=
p;  Iterator i =3D =
clauses.iterator();
       &nbs=
p;  while (i.hasNext()) =
{
 
Modified:
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNotQuery.java=
URL:
 
       &nbs=
p;      =
 
        =
 
      =
http://svn.apache.org/viewvc/lucene/java/branches/=
lucene_2_9_back_compat_t
<= pre>    =
 
 
       &nbs=
p;     =
 
 
        =
 
      =
ests/src/java/org/apache/lucene/search/spans/S=
panNotQuery.java?rev=3D824611&<=
/pre>
    =
 
r1=3D824610&r2=3D824611&view=3Ddiff
 
       &nbs=
p;      =
 
        =
 
      =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
=
    =
 
=3D=3D=3D=3D
---
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNotQuery.java =
(original)
+++
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanNotQuery.java Tue Oct 13 =
06:59:40 2009
@@ -49,12 +49,6 =
@@
 
    public String getField() { =
return include.getField(); =
}
 
-  /** Returns a collection of all terms =
matched by this =
query.
-   * @deprecated use extractTerms =
instead
-   * @see =
#extractTerms(Set)
-   =
*/
-  public Collection getTerms() { return =
include.getTerms(); =
}
-
<= pre>    public void = extractTerms(Set terms) = {
include.extractTerms(terms); =
}
 
    public String =
toString(String field) =
{
 
Modified:
 
       &nbs=
p;    =
  
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanOrQuery.java<=
o:p>
URL:
 
       &nbs=
p;      =
 
        =
 
      =
http://svn.apache.org/viewvc/lucene/java/branches/=
lucene_2_9_back_compat_t
<= pre>    =
 
 
       &nbs=
p;      =
 
        =
 
      =
ests/src/java/org/apache/lucene/search/spans/S=
panOrQuery.java?rev=3D824611&r<=
/pre>
    =
 
1=3D824610&r2=3D824611&view=3Ddiff
 
       &nbs=
p;      =
 
     =
   
 
      =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
=
    =
 
=3D=3D=3D=3D
---
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanOrQuery.java =
(original)
+++
 
       &nbs=
p;      =
 
        =
 
      =
lucene/java/branches/lucene_2_9_back_compat_te=
sts/src/java/org/apache/luce
<= pre>    =
 
ne/search/spans/SpanOrQuery.java Tue Oct 13 =
06:59:40 2009
@@ -58,20 +58,6 =
@@
 
    public String getField() { =
return field; }
 
-  /** Returns a collection of all terms =
matched by this =
query.
-   * @deprecated use extractTerms =
instead
-   * @see =
#extractTerms(Set)
-   =
*/
-  public Collection getTerms() =
{
-    Collection terms =3D new =
ArrayList();
-    Iterator i =3D =
clauses.iterator();
-    while (i.hasNext()) =
{
-      SpanQuery =
clause =3D =
(SpanQuery)i.next();
-      =
terms.addAll(clause.getTerms());
-    =
}
-    return =
terms;
-  =
}
-
<= pre>    public void = extractTerms(Set terms) = {
      Iterator i =3D =
clauses.iterator();
      while =
(i.hasNext()) {
 
       &nbs=
p;      =
 
 
----------------------------------------------=
---------------------
       &nbs=
p;    =
--
=
    =
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
 
 
       &nbs=
p;    =
 
       &nbs=
p;  
 
 
----------------------------------------------=
-----------------------
<=
font
size=3D2 color=3Dblack face=3D"Courier New">To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
        =
 
 
 
----------------------------------------------=
-----------------------
<=
font
size=3D2 color=3Dblack face=3D"Courier New">To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
      =
 
 
 
----------------------------------------------=
-----------------------
<=
font
size=3D2 color=3Dblack face=3D"Courier New">To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
    =
 
  =
 
 
 
----------------------------------------------=
-----------------------
<=
font
size=3D2 color=3Dblack face=3D"Courier New">To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org

 

 

------=_NextPart_000_0009_01CA4BF2.7C313950--