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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -116,12 +116,8 @@ class DefinitionsParser {
|
||||
}
|
||||
if (types.isEmpty() && element instanceof Field) {
|
||||
Field field = (Field) element;
|
||||
if (field.getGenericType() instanceof TypeVariable) {
|
||||
types.add(ResolvableType.forField(field, source));
|
||||
}
|
||||
else {
|
||||
types.add(ResolvableType.forField(field));
|
||||
}
|
||||
types.add((field.getGenericType() instanceof TypeVariable) ? ResolvableType.forField(field, source)
|
||||
: ResolvableType.forField(field));
|
||||
}
|
||||
return types;
|
||||
}
|
||||
|
@ -200,12 +200,11 @@ final class ModifiedClassPathClassLoader extends URLClassLoader {
|
||||
RepositorySystem repositorySystem = serviceLocator.getService(RepositorySystem.class);
|
||||
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
|
||||
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));
|
||||
for (int i = 0; i < MAX_RESOLUTION_ATTEMPTS; i++) {
|
||||
CollectRequest collectRequest = new CollectRequest(null,
|
||||
Arrays.asList(
|
||||
new RemoteRepository.Builder("central", "default", "https://repo.maven.apache.org/maven2")
|
||||
.build()));
|
||||
CollectRequest collectRequest = new CollectRequest(null, Arrays.asList(remoteRepository));
|
||||
collectRequest.setDependencies(createDependencies(coordinates));
|
||||
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, null);
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user