Browse Source

Merge pull request #32281 from kilink

* pr/32281:
  Update copyright year of changed files
  Use Spliterator of underlying collection

Closes gh-32281
pull/32403/head
Stéphane Nicoll 2 years ago
parent
commit
26ca7c49fb
  1. 5
      spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java
  2. 5
      spring-core/src/main/java/org/springframework/core/env/MutablePropertySources.java

5
spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -25,7 +25,6 @@ import java.util.List; @@ -25,7 +25,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.stream.Stream;
import org.springframework.lang.Nullable;
@ -255,7 +254,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable { @@ -255,7 +254,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
@Override
public Spliterator<PropertyValue> spliterator() {
return Spliterators.spliterator(this.propertyValueList, 0);
return this.propertyValueList.spliterator();
}
@Override

5
spring-core/src/main/java/org/springframework/core/env/MutablePropertySources.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -19,7 +19,6 @@ package org.springframework.core.env; @@ -19,7 +19,6 @@ package org.springframework.core.env;
import java.util.Iterator;
import java.util.List;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Stream;
@ -69,7 +68,7 @@ public class MutablePropertySources implements PropertySources { @@ -69,7 +68,7 @@ public class MutablePropertySources implements PropertySources {
@Override
public Spliterator<PropertySource<?>> spliterator() {
return Spliterators.spliterator(this.propertySourceList, 0);
return this.propertySourceList.spliterator();
}
@Override

Loading…
Cancel
Save