Skip to content

Commit 8e36e70

Browse files
committed
Bumping versions
1 parent d771b76 commit 8e36e70

File tree

189 files changed

+1791
-1328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+1791
-1328
lines changed

specs/spring-cloud-contract-spec-groovy/src/main/groovy/org/springframework/cloud/contract/spec/internal/GroovyDslPropertyConverter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public class GroovyDslPropertyConverter implements DslPropertyConverter {
3535
public Object testSide(Object object) {
3636
if (object instanceof GString) {
3737
boolean anyPattern = Arrays.stream(((GString) object).getValues())
38-
.anyMatch(it -> it instanceof RegexProperty);
38+
.anyMatch(it -> it instanceof RegexProperty);
3939
if (!anyPattern) {
4040
return object;
4141
}
4242
List<Object> generatedValues = Arrays.stream(((GString) object).getValues())
43-
.map(it -> it instanceof RegexProperty ? ((RegexProperty) it).generate() : it)
44-
.collect(Collectors.toList());
43+
.map(it -> it instanceof RegexProperty ? ((RegexProperty) it).generate() : it)
44+
.collect(Collectors.toList());
4545
Object[] arrayOfObjects = generatedValues.toArray();
4646
String[] strings = Arrays.copyOf(((GString) object).getStrings(), ((GString) object).getStrings().length,
4747
String[].class);

specs/spring-cloud-contract-spec-java/src/main/java/org/springframework/cloud/contract/spec/internal/Common.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
public class Common {
4141

4242
public Map<String, DslProperty> convertObjectsToDslProperties(Map<String, Object> body) {
43-
return body.entrySet().stream()
44-
.collect(Collectors.toMap((Function<Map.Entry, String>) t -> t.getKey().toString(),
45-
(Function<Map.Entry, DslProperty>) t -> toDslProperty(t.getValue()), throwingMerger(),
46-
LinkedHashMap::new));
43+
return body.entrySet()
44+
.stream()
45+
.collect(Collectors.toMap((Function<Map.Entry, String>) t -> t.getKey().toString(),
46+
(Function<Map.Entry, DslProperty>) t -> toDslProperty(t.getValue()), throwingMerger(),
47+
LinkedHashMap::new));
4748
}
4849

4950
private static <T> BinaryOperator<T> throwingMerger() {

specs/spring-cloud-contract-spec-java/src/main/java/org/springframework/cloud/contract/spec/internal/Headers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
public class Headers {
3838

3939
private static final BiFunction<String, Header, Object> CLIENT_SIDE = (s, header) -> ContractUtils
40-
.convertStubSideRecursively(header);
40+
.convertStubSideRecursively(header);
4141

4242
private static final BiFunction<String, Header, Object> SERVER_SIDE = (s, header) -> ContractUtils
43-
.convertTestSideRecursively(header);
43+
.convertTestSideRecursively(header);
4444

4545
private Set<Header> entries = new LinkedHashSet<>();
4646

specs/spring-cloud-contract-spec-java/src/main/java/org/springframework/cloud/contract/spec/internal/RegexPatterns.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ public RegexPatterns() {
6868
protected static final Pattern HTTPS_URL = UrlHelper.HTTPS_URL;
6969

7070
protected static final Pattern UUID = Pattern
71-
.compile("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}", Pattern.CASE_INSENSITIVE);
71+
.compile("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}", Pattern.CASE_INSENSITIVE);
7272

7373
protected static final Pattern UUID4 = Pattern
74-
.compile("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}", Pattern.CASE_INSENSITIVE);
74+
.compile("[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}", Pattern.CASE_INSENSITIVE);
7575

7676
protected static final Pattern ANY_DATE = Pattern
77-
.compile("(\\d\\d\\d\\d)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])");
77+
.compile("(\\d\\d\\d\\d)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])");
7878

79-
protected static final Pattern ANY_DATE_TIME = Pattern.compile(
80-
"([0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])");
79+
protected static final Pattern ANY_DATE_TIME = Pattern
80+
.compile("([0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])");
8181

8282
protected static final Pattern ANY_TIME = Pattern.compile("(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])");
8383

@@ -89,9 +89,9 @@ public RegexPatterns() {
8989
"([0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.\\d+)?(Z|[+-][01]\\d:[0-5]\\d)");
9090

9191
protected static Pattern anyOf(String... values) {
92-
return Pattern
93-
.compile(Arrays.stream(values).map(it -> '^' + RegexpUtils.escapeSpecialRegexWithSingleEscape(it) + '$')
94-
.collect(Collectors.joining("|")));
92+
return Pattern.compile(Arrays.stream(values)
93+
.map(it -> '^' + RegexpUtils.escapeSpecialRegexWithSingleEscape(it) + '$')
94+
.collect(Collectors.joining("|")));
9595
}
9696

9797
public static String multipartParam(Object name, Object value) {

specs/spring-cloud-contract-spec-java/src/main/java/org/springframework/cloud/contract/spec/internal/Response.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,8 @@ static class ResponseHeaders extends Headers {
742742
@Override
743743
public DslProperty matching(final String value) {
744744
return this.common.$(
745-
this.common.p(
746-
notEscaped(Pattern.compile(RegexpUtils.escapeSpecialRegexWithSingleEscape(value) + ".*"))),
745+
this.common
746+
.p(notEscaped(Pattern.compile(RegexpUtils.escapeSpecialRegexWithSingleEscape(value) + ".*"))),
747747
this.common.c(value));
748748
}
749749

specs/spring-cloud-contract-spec-java/src/main/java/repackaged/nl/flotsam/xeger/Xeger.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public Xeger(String regex, Random random) {
5959
assert random != null;
6060
// https://stackoverflow.com/questions/1578789/how-do-i-generate-text-matching-a-regular-expression-from-a-regular-expression
6161
String pattern = regex.replace("\\d", "[0-9]") // Used d=Digit
62-
.replace("\\w", "[A-Za-z0-9_]") // Used =Word
63-
.replace("\\s", "[ \t\r\n]"); // Used s="White"Space
62+
.replace("\\w", "[A-Za-z0-9_]") // Used =Word
63+
.replace("\\s", "[ \t\r\n]"); // Used s="White"Space
6464
this.automaton = new RegExp(pattern).toAutomaton();
6565
this.random = random;
6666
String generatedCharsSysProp = System.getProperty("springCloudContractGeneratedCharsFromRegex");

spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/AetherStubDownloader.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private List<RemoteRepository> remoteRepositories(StubRunnerOptions stubRunnerOp
153153
for (int i = 0; i < repos.length; i++) {
154154
if (StringUtils.hasText(repos[i])) {
155155
final RemoteRepository.Builder builder = new RemoteRepository.Builder("remote" + i, "default", repos[i])
156-
.setAuthentication(resolveAuthentication(stubRunnerOptions));
156+
.setAuthentication(resolveAuthentication(stubRunnerOptions));
157157
if (stubRunnerOptions.getProxyOptions() != null) {
158158
final StubRunnerProxyOptions p = stubRunnerOptions.getProxyOptions();
159159
builder.setProxy(new Proxy(null, p.getProxyHost(), p.getProxyPort()));
@@ -176,7 +176,9 @@ private Authentication resolveAuthentication(StubRunnerOptions stubRunnerOptions
176176
}
177177
SettingsDecryptionRequest settingsDecryptionRequest = new DefaultSettingsDecryptionRequest(stubServer);
178178
String stubServerPassword = new MavenSettings().createSettingsDecrypter()
179-
.decrypt(settingsDecryptionRequest).getServer().getPassword();
179+
.decrypt(settingsDecryptionRequest)
180+
.getServer()
181+
.getPassword();
180182
return buildAuthentication(stubServerPassword, stubServer.getUsername());
181183
}
182184
}
@@ -272,8 +274,9 @@ private String resolveHighestArtifactVersion(String stubsGroup, String stubsModu
272274
}
273275

274276
private void registerShutdownHook() {
275-
Runtime.getRuntime().addShutdownHook(
276-
new Thread(() -> TemporaryFileStorage.cleanup(AetherStubDownloader.this.deleteStubsAfterTest)));
277+
Runtime.getRuntime()
278+
.addShutdownHook(
279+
new Thread(() -> TemporaryFileStorage.cleanup(AetherStubDownloader.this.deleteStubsAfterTest)));
277280
}
278281

279282
}

spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/ContractDownloader.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public File unpackAndDownloadContracts() {
6969
log.debug("Will download contracts for [" + this.contractsJarStubConfiguration + "]");
7070
}
7171
Map.Entry<StubConfiguration, File> unpackedContractStubs = this.stubDownloader
72-
.downloadAndUnpackStubJar(this.contractsJarStubConfiguration);
72+
.downloadAndUnpackStubJar(this.contractsJarStubConfiguration);
7373
if (unpackedContractStubs == null) {
7474
throw new IllegalStateException("The contracts failed to be downloaded!");
7575
}
@@ -145,7 +145,8 @@ private String groupAndArtifact(String separator) {
145145

146146
private String patternFromProperty(File contractsDirectory) {
147147
return ("^" + contractsDirectory.getAbsolutePath() + "(" + File.separator + ")?" + ".*"
148-
+ contractsPath().replace("/", File.separator) + ".*$").replace("\\", "\\\\");
148+
+ contractsPath().replace("/", File.separator) + ".*$")
149+
.replace("\\", "\\\\");
149150
}
150151

151152
private String contractsPath() {
@@ -165,7 +166,7 @@ private String wrapWithAntPattern(String path) {
165166
private String groupArtifactToPattern(File contractsDirectory) {
166167
return ("^" + contractsDirectory.getAbsolutePath() + "(" + File.separator + ")?" + ".*"
167168
+ slashSeparatedGroupId() + File.separator + this.projectArtifactId + File.separator + ".*$")
168-
.replace("\\", "\\\\");
169+
.replace("\\", "\\\\");
169170
}
170171

171172
private String fileToPattern(File contractsDirectory) {

spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/FileStubDownloader.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ public Map.Entry<StubConfiguration, File> downloadAndUnpackStubJar(StubConfigura
152152
String schemeSpecific = schemeSpecificPart();
153153
log.info("Stubs are present under [" + schemeSpecific + "]. Will copy them to a temporary directory.");
154154
return new ResourceResolvingStubDownloader(stubRunnerOptions, this::repoRootForSchemeSpecificPart,
155-
this::anyPattern).downloadAndUnpackStubJar(stubConfiguration);
155+
this::anyPattern)
156+
.downloadAndUnpackStubJar(stubConfiguration);
156157
}
157158
return new ResourceResolvingStubDownloader(stubRunnerOptions, this::repoRoot, this::gavPattern)
158-
.downloadAndUnpackStubJar(stubConfiguration);
159+
.downloadAndUnpackStubJar(stubConfiguration);
159160
}
160161

161162
private RepoRoots repoRootForSchemeSpecificPart(StubRunnerOptions stubRunnerOptions,

spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/GitRepo.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ private Git cloneToBasedir(URI projectUrl, File destinationFolder) {
219219
if (log.isDebugEnabled()) {
220220
log.debug("Project git url [" + projectGitUrl + "]");
221221
}
222-
CloneCommand command = this.gitFactory.getCloneCommandByCloneRepository().setURI(projectGitUrl)
223-
.setDirectory(destinationFolder);
222+
CloneCommand command = this.gitFactory.getCloneCommandByCloneRepository()
223+
.setURI(projectGitUrl)
224+
.setDirectory(destinationFolder);
224225
try {
225226
Git git = command.call();
226227
if (git.getRepository().getRemoteNames().isEmpty()) {
@@ -278,8 +279,10 @@ private boolean shouldTrack(Git git, String label) throws GitAPIException {
278279
}
279280

280281
private void trackBranch(CheckoutCommand checkout, String label) {
281-
checkout.setCreateBranch(true).setName(label).setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK)
282-
.setStartPoint("origin/" + label);
282+
checkout.setCreateBranch(true)
283+
.setName(label)
284+
.setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK)
285+
.setStartPoint("origin/" + label);
283286
}
284287

285288
private boolean isBranch(Git git, String label) throws GitAPIException {
@@ -389,8 +392,9 @@ CredentialsProvider credentialsProvider(GitStubDownloaderProperties properties)
389392
}
390393

391394
CloneCommand getCloneCommandByCloneRepository() {
392-
return Git.cloneRepository().setCredentialsProvider(this.provider)
393-
.setTransportConfigCallback(this.callback);
395+
return Git.cloneRepository()
396+
.setCredentialsProvider(this.provider)
397+
.setTransportConfigCallback(this.callback);
394398
}
395399

396400
PushCommand push(Git git) {

0 commit comments

Comments
 (0)