Skip to content

Commit 569138a

Browse files
committed
Refactor Remove redundant null check for sorter
1 parent 5e33808 commit 569138a

File tree

1 file changed

+1
-1
lines changed
  • spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/annotation

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/annotation/Configurations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected Configurations(UnaryOperator<Collection<Class<?>>> sorter, Collection<
9292
Assert.notNull(classes, "Classes must not be null");
9393
sorter = (sorter != null) ? sorter : UnaryOperator.identity();
9494
Collection<Class<?>> sorted = sorter.apply(classes);
95-
this.sorter = (sorter != null) ? sorter : UnaryOperator.identity();
95+
this.sorter = sorter;
9696
this.classes = Collections.unmodifiableSet(new LinkedHashSet<>(sorted));
9797
this.beanNameGenerator = beanNameGenerator;
9898
}

0 commit comments

Comments
 (0)