Skip to content

Commit

Permalink
Merge pull request #43343 from Jae-Young98
Browse files Browse the repository at this point in the history
* pr/43343:
  Polish "Remove redundant null check for sorter"
  Remove redundant null check for sorter

Closes gh-43343
  • Loading branch information
mhalbritter committed Dec 2, 2024
2 parents 5e33808 + 07bc5f2 commit a93055c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ protected Configurations(Collection<Class<?>> classes) {
protected Configurations(UnaryOperator<Collection<Class<?>>> sorter, Collection<Class<?>> classes,
Function<Class<?>, String> beanNameGenerator) {
Assert.notNull(classes, "Classes must not be null");
sorter = (sorter != null) ? sorter : UnaryOperator.identity();
Collection<Class<?>> sorted = sorter.apply(classes);
this.sorter = (sorter != null) ? sorter : UnaryOperator.identity();
Collection<Class<?>> sorted = this.sorter.apply(classes);
this.classes = Collections.unmodifiableSet(new LinkedHashSet<>(sorted));
this.beanNameGenerator = beanNameGenerator;
}
Expand Down

0 comments on commit a93055c

Please sign in to comment.