mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Merge branch '3.1.x' into 3.2.x
Closes gh-40117
This commit is contained in:
commit
957facf1cc
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -33,7 +33,7 @@ public class DefaultSourceDirectoryUrlFilter implements SourceDirectoryUrlFilter
|
|||
|
||||
private static final String[] COMMON_ENDINGS = { "/target/classes", "/bin" };
|
||||
|
||||
private static final Pattern URL_MODULE_PATTERN = Pattern.compile(".*\\/(.+)\\.jar");
|
||||
private static final Pattern URL_MODULE_PATTERN = Pattern.compile(".*/(.+)\\.jar");
|
||||
|
||||
private static final Pattern VERSION_PATTERN = Pattern.compile("^-\\d+(?:\\.\\d+)*(?:[.-].+)?$");
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ class PulsarDockerComposeConnectionDetailsFactoryIntegrationTests extends Abstra
|
|||
void runCreatesConnectionDetails() {
|
||||
PulsarConnectionDetails connectionDetails = run(PulsarConnectionDetails.class);
|
||||
assertThat(connectionDetails).isNotNull();
|
||||
assertThat(connectionDetails.getBrokerUrl()).matches("^pulsar:\\/\\/\\S+:\\d+");
|
||||
assertThat(connectionDetails.getAdminUrl()).matches("^http:\\/\\/\\S+:\\d+");
|
||||
assertThat(connectionDetails.getBrokerUrl()).matches("^pulsar://\\S+:\\d+");
|
||||
assertThat(connectionDetails.getAdminUrl()).matches("^http://\\S+:\\d+");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@ dependencies {
|
|||
|
||||
checkRuntimeClasspathForConflicts {
|
||||
ignore { name -> name.startsWith("org/bouncycastle/") ||
|
||||
name.matches("^org\\/apache\\/pulsar\\/.*\\/package-info.class\$") ||
|
||||
name.matches("^org/apache/pulsar/.*/package-info.class\$") ||
|
||||
name.equals("findbugsExclude.xml") }
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@ dependencies {
|
|||
|
||||
checkRuntimeClasspathForConflicts {
|
||||
ignore { name -> name.startsWith("org/bouncycastle/") ||
|
||||
name.matches("^org\\/apache\\/pulsar\\/.*\\/package-info.class\$") ||
|
||||
name.matches("^org/apache/pulsar/.*/package-info.class\$") ||
|
||||
name.equals("findbugsExclude.xml") }
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -35,7 +35,7 @@ import org.springframework.util.ObjectUtils;
|
|||
*/
|
||||
public final class ImageReference {
|
||||
|
||||
private static final Pattern JAR_VERSION_PATTERN = Pattern.compile("^(.*)(\\-\\d+)$");
|
||||
private static final Pattern JAR_VERSION_PATTERN = Pattern.compile("^(.*)(-\\d+)$");
|
||||
|
||||
private static final String LATEST = "latest";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -195,7 +195,7 @@ class JavaPluginActionIntegrationTests {
|
|||
@TestTemplate
|
||||
void productionRuntimeClasspathIsConfiguredWithAttributesThatMatchRuntimeClasspath() {
|
||||
String output = this.gradleBuild.build("build").getOutput();
|
||||
Matcher matcher = Pattern.compile("runtimeClasspath: (\\[.*\\])").matcher(output);
|
||||
Matcher matcher = Pattern.compile("runtimeClasspath: (\\[.*])").matcher(output);
|
||||
assertThat(matcher.find()).as("%s found in %s", matcher, output).isTrue();
|
||||
String attributes = matcher.group(1);
|
||||
assertThat(output).contains("productionRuntimeClasspath: " + attributes);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -36,7 +36,7 @@ import org.springframework.util.ReflectionUtils;
|
|||
*/
|
||||
public class GradleBuildExtension implements BeforeEachCallback, AfterEachCallback {
|
||||
|
||||
private static final Pattern GRADLE_VERSION_PATTERN = Pattern.compile("\\[Gradle .+\\]");
|
||||
private static final Pattern GRADLE_VERSION_PATTERN = Pattern.compile("\\[Gradle .+]");
|
||||
|
||||
private final Dsl dsl = Dsl.GROOVY;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -42,7 +42,7 @@ public class DefaultLaunchScript implements LaunchScript {
|
|||
|
||||
private static final int BUFFER_SIZE = 4096;
|
||||
|
||||
private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("\\{\\{(\\w+)(:.*?)?\\}\\}(?!\\})");
|
||||
private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("\\{\\{(\\w+)(:.*?)?}}(?!})");
|
||||
|
||||
private static final Set<String> FILE_PATH_KEYS = Collections.singleton("inlinedConfScript");
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -90,7 +90,7 @@ public class TestJarFile {
|
|||
}
|
||||
|
||||
private File getFilePath(String filename) {
|
||||
String[] paths = filename.split("\\/");
|
||||
String[] paths = filename.split("/");
|
||||
File file = this.jarSource;
|
||||
for (String path : paths) {
|
||||
file = new File(file, path);
|
||||
|
|
|
@ -8,9 +8,9 @@ private String format(String input) {
|
|||
.replace("<br>", " ")
|
||||
.replace("\n", " ")
|
||||
.replace(""", '"')
|
||||
.replaceAll('\\{@code (.*?)\\}', '`$1`')
|
||||
.replaceAll('\\{@link (.*?)\\}', '`$1`')
|
||||
.replaceAll('\\{@literal (.*?)\\}', '`$1`')
|
||||
.replaceAll('\\{@code (.*?)}', '`$1`')
|
||||
.replaceAll('\\{@link (.*?)}', '`$1`')
|
||||
.replaceAll('\\{@literal (.*?)}', '`$1`')
|
||||
.replaceAll('<a href=."(.*?)".>(.*?)</a>', '\$1[\$2]')
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -66,7 +66,7 @@ public class StandardConfigDataLocationResolver
|
|||
|
||||
private static final Pattern URL_PREFIX = Pattern.compile("^([a-zA-Z][a-zA-Z0-9*]*?:)(.*$)");
|
||||
|
||||
private static final Pattern EXTENSION_HINT_PATTERN = Pattern.compile("^(.*)\\[(\\.\\w+)\\](?!\\[)$");
|
||||
private static final Pattern EXTENSION_HINT_PATTERN = Pattern.compile("^(.*)\\[(\\.\\w+)](?!\\[)$");
|
||||
|
||||
private static final String NO_PROFILE = null;
|
||||
|
||||
|
|
|
@ -588,7 +588,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
|
|||
initialize(loggingInitializationContext, null, null);
|
||||
this.logger.info("Hello world");
|
||||
assertThat(getLineWithText(output, "Hello world"))
|
||||
.containsPattern("\\d{4}-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}([-+]\\d{2}:\\d{2}|Z)");
|
||||
.containsPattern("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}([-+]\\d{2}:\\d{2}|Z)");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -152,7 +152,7 @@ class MimeMappingsTests {
|
|||
@Test
|
||||
void mimeTypesInDefaultMappingsAreCorrectlyStructured() {
|
||||
String regName = "[A-Za-z0-9!#$&.+\\-^_]{1,127}";
|
||||
Pattern pattern = Pattern.compile("^" + regName + "\\/" + regName + "$");
|
||||
Pattern pattern = Pattern.compile("^" + regName + "/" + regName + "$");
|
||||
assertThat(MimeMappings.DEFAULT).allSatisfy((mapping) -> assertThat(mapping.getMimeType()).matches(pattern));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user