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

replace TestRandomChains.Predicate with java.util.function.Predicate

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 6.3
    • Fix Version/s: 7.0, 6.4
    • Component/s: general/test
    • Labels:
    • Lucene Fields:
      New, Patch Available
    • Flags:
      Patch

      Description

      TestRandomChains has its own Predicate interface which can be replaced with java.util.function.Predicate

      1. LUCENE-7599.patch
        16 kB
        Ahmet Arslan
      2. LUCENE-7599.patch
        13 kB
        Ahmet Arslan

        Issue Links

          Activity

          Hide
          iorixxx Ahmet Arslan added a comment -

          Patch that removes TestRandomChains.Predicate in favour of {{java.util.function.Predicate}. It simplifies code with lambda expressions or method references.

          Show
          iorixxx Ahmet Arslan added a comment - Patch that removes TestRandomChains.Predicate in favour of {{java.util.function.Predicate}. It simplifies code with lambda expressions or method references.
          Hide
          iorixxx Ahmet Arslan added a comment -

          Patch that replaces ArgProducer with Function<Random,Object>

          Show
          iorixxx Ahmet Arslan added a comment - Patch that replaces ArgProducer with Function<Random,Object>
          Hide
          jpountz Adrien Grand added a comment -

          Thank you Ahmet, it looks good to me. I'll merge it soon.

          Show
          jpountz Adrien Grand added a comment - Thank you Ahmet, it looks good to me. I'll merge it soon.
          Hide
          thetaphi Uwe Schindler added a comment -

          Strong +1 !!!

          Somehow I missed this, was on my "mental TODO list" for long time

          Show
          thetaphi Uwe Schindler added a comment - Strong +1 !!! Somehow I missed this, was on my "mental TODO list" for long time
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 0ed716490cdc2ddc6f67977c1f4074b9fd072486 in lucene-solr's branch refs/heads/branch_6x from Adrien Grand
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0ed7164 ]

          LUCENE-7599: Simplify TestRandomChains using Java's built-in Predicate and Function interfaces.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 0ed716490cdc2ddc6f67977c1f4074b9fd072486 in lucene-solr's branch refs/heads/branch_6x from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0ed7164 ] LUCENE-7599 : Simplify TestRandomChains using Java's built-in Predicate and Function interfaces.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5020ea28bc4255de473e795a6638ae67f2720396 in lucene-solr's branch refs/heads/master from Adrien Grand
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5020ea2 ]

          LUCENE-7599: Simplify TestRandomChains using Java's built-in Predicate and Function interfaces.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5020ea28bc4255de473e795a6638ae67f2720396 in lucene-solr's branch refs/heads/master from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5020ea2 ] LUCENE-7599 : Simplify TestRandomChains using Java's built-in Predicate and Function interfaces.

            People

            • Assignee:
              Unassigned
              Reporter:
              iorixxx Ahmet Arslan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development