mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
This commit is contained in:
parent
07699ea6ff
commit
fdd6a89a61
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2020 the original author or authors.
|
* Copyright 2020-2020 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.
|
||||||
|
@ -116,12 +116,8 @@ class DefinitionsParser {
|
|||||||
}
|
}
|
||||||
if (types.isEmpty() && element instanceof Field) {
|
if (types.isEmpty() && element instanceof Field) {
|
||||||
Field field = (Field) element;
|
Field field = (Field) element;
|
||||||
if (field.getGenericType() instanceof TypeVariable) {
|
types.add((field.getGenericType() instanceof TypeVariable) ? ResolvableType.forField(field, source)
|
||||||
types.add(ResolvableType.forField(field, source));
|
: ResolvableType.forField(field));
|
||||||
}
|
|
||||||
else {
|
|
||||||
types.add(ResolvableType.forField(field));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
@ -200,12 +200,11 @@ final class ModifiedClassPathClassLoader extends URLClassLoader {
|
|||||||
RepositorySystem repositorySystem = serviceLocator.getService(RepositorySystem.class);
|
RepositorySystem repositorySystem = serviceLocator.getService(RepositorySystem.class);
|
||||||
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
|
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
|
||||||
LocalRepository localRepository = new LocalRepository(System.getProperty("user.home") + "/.m2/repository");
|
LocalRepository localRepository = new LocalRepository(System.getProperty("user.home") + "/.m2/repository");
|
||||||
|
RemoteRepository remoteRepository = new RemoteRepository.Builder("central", "default",
|
||||||
|
"https://repo.maven.apache.org/maven2").build();
|
||||||
session.setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(session, localRepository));
|
session.setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(session, localRepository));
|
||||||
for (int i = 0; i < MAX_RESOLUTION_ATTEMPTS; i++) {
|
for (int i = 0; i < MAX_RESOLUTION_ATTEMPTS; i++) {
|
||||||
CollectRequest collectRequest = new CollectRequest(null,
|
CollectRequest collectRequest = new CollectRequest(null, Arrays.asList(remoteRepository));
|
||||||
Arrays.asList(
|
|
||||||
new RemoteRepository.Builder("central", "default", "https://repo.maven.apache.org/maven2")
|
|
||||||
.build()));
|
|
||||||
collectRequest.setDependencies(createDependencies(coordinates));
|
collectRequest.setDependencies(createDependencies(coordinates));
|
||||||
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, null);
|
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, null);
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user