Skip to content

JDK8 provides its own List#sort, Map#replace, and Map#merge #1249

@headius

Description

@headius

We have been providing monkey-patched List#sort, Map#replace, and Map#merge, but they now conflict with the ones from JDK8. For example, sort:

public void sort(Comparator<? super E> c)

We add a sort to list that just turns a passed block into a Comparator. Because Ruby does not do overloads, only the one-argument version in ArrayList is seen, which causes our tests to fail like so:

  1) Error:
test_list(TestJavaExtension):
ArgumentError: wrong number of arguments (0 for 1)
    test/test_java_extension.rb:66:in `test_list'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions