From eca755ec88a6f9c91d335f4d0931cb79668164ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Fri, 11 Feb 2022 17:42:06 +0100 Subject: [PATCH 1/2] Upgrade to Dokka 1.6.10 Closes gh-28040 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f80d651977..e126405cff 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'io.spring.dependency-management' version '1.0.11.RELEASE' apply false id 'io.spring.nohttp' version '0.0.10' id "io.freefair.aspectj" version '6.2.0' apply false - id 'org.jetbrains.dokka' version '1.5.0' apply false + id 'org.jetbrains.dokka' version '1.6.10' apply false id 'org.jetbrains.kotlin.jvm' version '1.5.32' apply false id "org.jetbrains.kotlin.plugin.serialization" version "1.5.32" apply false id 'org.asciidoctor.jvm.convert' version '3.3.2' From 4eaee1e7381d5f3d8cd6e3ab77c8cfcf7ef2d716 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 11 Feb 2022 20:41:23 +0100 Subject: [PATCH 2/2] Short circuit if-conditions in AttributeMethods --- .../springframework/core/annotation/AttributeMethods.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java b/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java index f5c06ff051..caf1772148 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -32,6 +32,7 @@ import org.springframework.util.ReflectionUtils; * with consistent ordering as well as a few useful utility methods. * * @author Phillip Webb + * @author Sam Brannen * @since 5.2 */ final class AttributeMethods { @@ -71,10 +72,10 @@ final class AttributeMethods { for (int i = 0; i < attributeMethods.length; i++) { Method method = this.attributeMethods[i]; Class type = method.getReturnType(); - if (method.getDefaultValue() != null) { + if (!foundDefaultValueMethod && (method.getDefaultValue() != null)) { foundDefaultValueMethod = true; } - if (type.isAnnotation() || (type.isArray() && type.getComponentType().isAnnotation())) { + if (!foundNestedAnnotation && (type.isAnnotation() || (type.isArray() && type.getComponentType().isAnnotation()))) { foundNestedAnnotation = true; } ReflectionUtils.makeAccessible(method);