diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java index bde0ae433af..06398788350 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -34,6 +34,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.diagnostics.FailureAnalysis; import org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter; +import org.springframework.boot.system.JavaVersion; import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -153,8 +154,14 @@ class NoSuchBeanDefinitionFailureAnalyzerTests { @Test void failureAnalysisForUnmatchedQualifier() { FailureAnalysis analysis = analyzeFailure(createFailure(QualifiedBeanConfiguration.class)); - assertThat(analysis.getDescription()) - .containsPattern("@org.springframework.beans.factory.annotation.Qualifier\\(value=\"*alpha\"*\\)"); + assertThat(analysis.getDescription()).containsPattern(determineAnnotationValuePattern()); + } + + private String determineAnnotationValuePattern() { + if (JavaVersion.getJavaVersion().isEqualOrNewerThan(JavaVersion.FOURTEEN)) { + return "@org.springframework.beans.factory.annotation.Qualifier\\(\"*alpha\"*\\)"; + } + return "@org.springframework.beans.factory.annotation.Qualifier\\(value=\"*alpha\"*\\)"; } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/pom.xml index 94a48efafa5..248c2b71c33 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/pom.xml @@ -389,7 +389,7 @@ java13 - 13 + [13,) assemble diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java index 6303e8808c9..6844282800f 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -98,6 +98,7 @@ public abstract class TestJarCreator { writeEntry(jarOutputStream, "META-INF/versions/11/multi-release.dat", 11); writeEntry(jarOutputStream, "META-INF/versions/12/multi-release.dat", 12); writeEntry(jarOutputStream, "META-INF/versions/13/multi-release.dat", 13); + writeEntry(jarOutputStream, "META-INF/versions/14/multi-release.dat", 14); } else { writeEntry(jarOutputStream, "3.dat", 3); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java index 7bce2652fc4..e6fcb3ed01e 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -16,6 +16,7 @@ package org.springframework.boot.system; +import java.lang.invoke.MethodHandles; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -60,7 +61,12 @@ public enum JavaVersion { /** * Java 13. */ - THIRTEEN("13", String.class, "stripIndent"); + THIRTEEN("13", String.class, "stripIndent"), + + /** + * Java 14. + */ + FOURTEEN("14", MethodHandles.Lookup.class, "hasFullPrivilegeAccess"); private final String name; diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/pom.xml b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/pom.xml index 2b0b0fd109a..69e97ad8074 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/pom.xml +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/pom.xml @@ -48,4 +48,23 @@ + + + java14+ + + [14,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + +