Skip to content

Commit 557dbba

Browse files
committed
Remove superfluous addToClassHierarchy call for Enum types
Closes gh-32906
1 parent e9de426 commit 557dbba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -561,9 +561,8 @@ private List<Class<?>> getClassHierarchy(Class<?> type) {
561561
}
562562

563563
if (Enum.class.isAssignableFrom(type)) {
564-
addToClassHierarchy(hierarchy.size(), Enum.class, array, hierarchy, visited);
565564
addToClassHierarchy(hierarchy.size(), Enum.class, false, hierarchy, visited);
566-
addInterfacesToClassHierarchy(Enum.class, array, hierarchy, visited);
565+
addInterfacesToClassHierarchy(Enum.class, false, hierarchy, visited);
567566
}
568567

569568
addToClassHierarchy(hierarchy.size(), Object.class, array, hierarchy, visited);

0 commit comments

Comments
 (0)