Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a fix for failure to compile with OpenJDK11 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ostueker
Copy link

@ostueker ostueker commented Jan 2, 2020

The current version of the library fails to compile with OpenJDK11 with the following error:

$ JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64  mvn clean compile
[...]
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/ostueker/software-and-algorithms/src/main/java/blogspot/software_and_algorithms/stern_library/data_structure/ThriftyList.java:[1030,12] reference to toArray is ambiguous
  both method <T>toArray(java.util.function.IntFunction<T[]>) in java.util.Collection and method <U>toArray(U[]) in blogspot.software_and_algorithms.stern_library.data_structure.ThriftyList match
[INFO] 1 error
[INFO] -------------------------------------------------------------
[...]

This patch seems to fix the issue, though I don't understand the code nearly well enough to judge whether my solution does the right thing. The tests however, still pass after applying the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant