Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
579a6ac2
Commit
579a6ac2
authored
Mar 19, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt tests for support for Java 14
See gh-20576
parent
58a45c53
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
7 deletions
+40
-7
NoSuchBeanDefinitionFailureAnalyzerTests.java
...cs/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java
+10
-3
pom.xml
...oject/spring-boot-tools/spring-boot-gradle-plugin/pom.xml
+1
-1
TestJarCreator.java
.../java/org/springframework/boot/loader/TestJarCreator.java
+2
-1
JavaVersion.java
...ain/java/org/springframework/boot/system/JavaVersion.java
+8
-2
pom.xml
...ing-boot-smoke-tests/spring-boot-smoke-test-kafka/pom.xml
+19
-0
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java
View file @
579a6ac2
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/pom.xml
View file @
579a6ac2
...
...
@@ -389,7 +389,7 @@
<profile>
<id>
java13
</id>
<activation>
<jdk>
13
</jdk>
<jdk>
[13,)
</jdk>
</activation>
<properties>
<gradle.task>
assemble
</gradle.task>
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java
View file @
579a6ac2
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java
View file @
579a6ac2
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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
;
...
...
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/pom.xml
View file @
579a6ac2
...
...
@@ -48,4 +48,23 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>
java14+
</id>
<activation>
<jdk>
[14,)
</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<configuration>
<skipTests>
true
</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment