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

Resolve ambiguous method reference #5

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

Conversation

pkeller
Copy link

@pkeller pkeller commented May 24, 2022

When importing the XMLBeans code into Eclipse, I get the following compile-time errors at this line:

The method map(Function<? super List<? extends SchemaComponent>,? extends R>) in the type 
Stream<List<? extends SchemaComponent>> is not applicable for the arguments (((fun2 == null) ?  
SchemaTypeSystemImpl::buildComponentRefMap : fun2))

The type of buildComponentRefMap(List<? extends SchemaComponent>) from the type 
SchemaTypeSystemImpl is Map<QName,SchemaComponent.Ref>, this is incompatible with the 
descriptor's return type: R

This may well be a quirk of the Eclipse compiler, that it can't resolve ambiguous method references except as a simple argument to the map function, but switching to a lambda seems harmless to me and will help people who use Eclipse to examine the XMLBeans code.

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