Skip to content

Commit fdd6a89

Browse files
committed
Polish
1 parent 07699ea commit fdd6a89

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/command/DistributeProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 the original author or authors.
2+
* Copyright 2020-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/DefinitionsParser.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,8 @@ private Set<ResolvableType> getOrDeduceTypes(AnnotatedElement element, Class<?>[
116116
}
117117
if (types.isEmpty() && element instanceof Field) {
118118
Field field = (Field) element;
119-
if (field.getGenericType() instanceof TypeVariable) {
120-
types.add(ResolvableType.forField(field, source));
121-
}
122-
else {
123-
types.add(ResolvableType.forField(field));
124-
}
119+
types.add((field.getGenericType() instanceof TypeVariable) ? ResolvableType.forField(field, source)
120+
: ResolvableType.forField(field));
125121
}
126122
return types;
127123
}

spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathClassLoader.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,11 @@ private static List<URL> resolveCoordinates(String[] coordinates) {
200200
RepositorySystem repositorySystem = serviceLocator.getService(RepositorySystem.class);
201201
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
202202
LocalRepository localRepository = new LocalRepository(System.getProperty("user.home") + "/.m2/repository");
203+
RemoteRepository remoteRepository = new RemoteRepository.Builder("central", "default",
204+
"https://repo.maven.apache.org/maven2").build();
203205
session.setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(session, localRepository));
204206
for (int i = 0; i < MAX_RESOLUTION_ATTEMPTS; i++) {
205-
CollectRequest collectRequest = new CollectRequest(null,
206-
Arrays.asList(
207-
new RemoteRepository.Builder("central", "default", "https://repo.maven.apache.org/maven2")
208-
.build()));
207+
CollectRequest collectRequest = new CollectRequest(null, Arrays.asList(remoteRepository));
209208
collectRequest.setDependencies(createDependencies(coordinates));
210209
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, null);
211210
try {

0 commit comments

Comments
 (0)