Merge branch '3.1.x' into 3.2.x

Closes gh-40117
This commit is contained in:
Moritz Halbritter 2024-03-27 09:34:39 +01:00
commit 957facf1cc
13 changed files with 24 additions and 24 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 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+)*(?:[.-].+)?$"); private static final Pattern VERSION_PATTERN = Pattern.compile("^-\\d+(?:\\.\\d+)*(?:[.-].+)?$");

View File

@ -39,8 +39,8 @@ class PulsarDockerComposeConnectionDetailsFactoryIntegrationTests extends Abstra
void runCreatesConnectionDetails() { void runCreatesConnectionDetails() {
PulsarConnectionDetails connectionDetails = run(PulsarConnectionDetails.class); PulsarConnectionDetails connectionDetails = run(PulsarConnectionDetails.class);
assertThat(connectionDetails).isNotNull(); assertThat(connectionDetails).isNotNull();
assertThat(connectionDetails.getBrokerUrl()).matches("^pulsar:\\/\\/\\S+:\\d+"); assertThat(connectionDetails.getBrokerUrl()).matches("^pulsar://\\S+:\\d+");
assertThat(connectionDetails.getAdminUrl()).matches("^http:\\/\\/\\S+:\\d+"); assertThat(connectionDetails.getAdminUrl()).matches("^http://\\S+:\\d+");
} }
} }

View File

@ -11,6 +11,6 @@ dependencies {
checkRuntimeClasspathForConflicts { checkRuntimeClasspathForConflicts {
ignore { name -> name.startsWith("org/bouncycastle/") || 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") } name.equals("findbugsExclude.xml") }
} }

View File

@ -11,6 +11,6 @@ dependencies {
checkRuntimeClasspathForConflicts { checkRuntimeClasspathForConflicts {
ignore { name -> name.startsWith("org/bouncycastle/") || 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") } name.equals("findbugsExclude.xml") }
} }

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 { 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"; private static final String LATEST = "latest";

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -195,7 +195,7 @@ class JavaPluginActionIntegrationTests {
@TestTemplate @TestTemplate
void productionRuntimeClasspathIsConfiguredWithAttributesThatMatchRuntimeClasspath() { void productionRuntimeClasspathIsConfiguredWithAttributesThatMatchRuntimeClasspath() {
String output = this.gradleBuild.build("build").getOutput(); 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(); assertThat(matcher.find()).as("%s found in %s", matcher, output).isTrue();
String attributes = matcher.group(1); String attributes = matcher.group(1);
assertThat(output).contains("productionRuntimeClasspath: " + attributes); assertThat(output).contains("productionRuntimeClasspath: " + attributes);

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 { 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; private final Dsl dsl = Dsl.GROOVY;

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 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"); private static final Set<String> FILE_PATH_KEYS = Collections.singleton("inlinedConfScript");

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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) { private File getFilePath(String filename) {
String[] paths = filename.split("\\/"); String[] paths = filename.split("/");
File file = this.jarSource; File file = this.jarSource;
for (String path : paths) { for (String path : paths) {
file = new File(file, path); file = new File(file, path);

View File

@ -8,9 +8,9 @@ private String format(String input) {
.replace("<br>", " ") .replace("<br>", " ")
.replace("\n", " ") .replace("\n", " ")
.replace("&quot;", '"') .replace("&quot;", '"')
.replaceAll('\\{@code (.*?)\\}', '`$1`') .replaceAll('\\{@code (.*?)}', '`$1`')
.replaceAll('\\{@link (.*?)\\}', '`$1`') .replaceAll('\\{@link (.*?)}', '`$1`')
.replaceAll('\\{@literal (.*?)\\}', '`$1`') .replaceAll('\\{@literal (.*?)}', '`$1`')
.replaceAll('<a href=."(.*?)".>(.*?)</a>', '\$1[\$2]') .replaceAll('<a href=."(.*?)".>(.*?)</a>', '\$1[\$2]')
} }

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 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; private static final String NO_PROFILE = null;

View File

@ -588,7 +588,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
initialize(loggingInitializationContext, null, null); initialize(loggingInitializationContext, null, null);
this.logger.info("Hello world"); this.logger.info("Hello world");
assertThat(getLineWithText(output, "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 @Test

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -152,7 +152,7 @@ class MimeMappingsTests {
@Test @Test
void mimeTypesInDefaultMappingsAreCorrectlyStructured() { void mimeTypesInDefaultMappingsAreCorrectlyStructured() {
String regName = "[A-Za-z0-9!#$&.+\\-^_]{1,127}"; 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)); assertThat(MimeMappings.DEFAULT).allSatisfy((mapping) -> assertThat(mapping.getMimeType()).matches(pattern));
} }