Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-611

TestConstantScoreRangeQuery does not compile with ecj

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1
    • Component/s: core/search
    • Labels:
      None
    • Environment:

      Eclipse 3.1.2, FC5

      Description

      TestConstantScoreRangeQuery has an assertEquals(String, Float, Float)
      but most of the calls to assertEquals are (String, int, int).

      ecj complains with the following error:
      The method assertEquals(String, float, float) is ambiguous for the type TestConstantScoreRangeQuery

      The simple solution is to supply an assertEquals(String, int, int) which calls Assert.assertEquals(String, int, int)

      Patch to follow.

        Activity

        Hide
        yseeley@gmail.com Yonik Seeley added a comment -

        Thanks, I just commited this.

        Show
        yseeley@gmail.com Yonik Seeley added a comment - Thanks, I just commited this.
        Hide
        dmsmith DM Smith added a comment -

        Other than gcj, everything compiles with ecj without error (given the attached patch).
        The gcj fails on an import which has nothing to do with ecj but with my building the build path.

        Gdata as expected needs to be compiled as Java 5. I compiled everything else under both 1.5 and 1.4 compatibility.

        I did find that two contrib files are duplicated. These are:
        ./queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
        ./similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java

        ./queries/src/java/org/apache/lucene/search/similar/SimilarityQueries.java
        ./similarity/src/java/org/apache/lucene/search/similar/SimilarityQueries.java

        The first pair only differed by whitespace.
        The second pair only by a comment and the style of imports.

        There is a dependency on queries by xml-query-parser, but non on similarity.
        So I'd suggest wacking similarity.

        Show
        dmsmith DM Smith added a comment - Other than gcj, everything compiles with ecj without error (given the attached patch). The gcj fails on an import which has nothing to do with ecj but with my building the build path. Gdata as expected needs to be compiled as Java 5. I compiled everything else under both 1.5 and 1.4 compatibility. I did find that two contrib files are duplicated. These are: ./queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java ./similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java ./queries/src/java/org/apache/lucene/search/similar/SimilarityQueries.java ./similarity/src/java/org/apache/lucene/search/similar/SimilarityQueries.java The first pair only differed by whitespace. The second pair only by a comment and the style of imports. There is a dependency on queries by xml-query-parser, but non on similarity. So I'd suggest wacking similarity.
        Hide
        dmsmith DM Smith added a comment -

        I have checked all of trunk/src/

        {java,demo,test}

        but not gcj. I have not checked any of contrib yet.
        Give me a bit and I'll check these out also.

        Show
        dmsmith DM Smith added a comment - I have checked all of trunk/src/ {java,demo,test} but not gcj. I have not checked any of contrib yet. Give me a bit and I'll check these out also.
        Hide
        yseeley@gmail.com Yonik Seeley added a comment -

        Are there any other ecj related compile issues?
        I'd rather fix all lucene-core related ones in a single JIRA isse/patch.

        Show
        yseeley@gmail.com Yonik Seeley added a comment - Are there any other ecj related compile issues? I'd rather fix all lucene-core related ones in a single JIRA isse/patch.

          People

          • Assignee:
            yseeley@gmail.com Yonik Seeley
            Reporter:
            dmsmith DM Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development