Skip to content

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