You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Introduce Stream support in PropertySources and PropertyValues [SPR-16894] #21433
while doing a PR in Spring-Boot polishing some stream creations, I figured that I could do even more cleanups if Spring-Framework would deliver a default implementation for stream support in PropertySources - providing an imho more modern way of interacting with them. E.g. something like that:
/** * Returns a sequential {@code Stream} for the {@link PropertySource objects} * contained in this instance. */defaultStream<PropertySource<?>> stream() {
returnStreamSupport.stream(spliterator(), false);
}
Let me know what you think of the proposal and the attached PR. I'd be happy if the pull request is accepted.
I've applied a broader revision for consistent Iterator as well as Stream support in PropertySources and PropertyValues (both of which are effectively pseudo-collections with quite similar design), with the implementations providing the best possible Spliterator whereas the interfaces just keep alternative implementations working.
Activity
spring-projects-issues commentedon Jul 5, 2018
Juergen Hoeller commented
I've applied a broader revision for consistent
Iteratoras well asStreamsupport inPropertySourcesandPropertyValues(both of which are effectively pseudo-collections with quite similar design), with the implementations providing the best possibleSpliteratorwhereas the interfaces just keep alternative implementations working.