Nullability refinements (based on IntelliJ IDEA 2018.1 introspection)

Issue: SPR-15756
This commit is contained in:
Juergen Hoeller
2018-03-29 23:50:17 +02:00
parent 1cc513d7db
commit d553ddc5b3
17 changed files with 84 additions and 107 deletions

View File

@@ -588,7 +588,7 @@ class ConfigurationClassParser {
}
private void processImports(ConfigurationClass configClass, SourceClass currentSourceClass,
Collection<SourceClass> importCandidates, boolean checkForCircularImports) throws IOException {
Collection<SourceClass> importCandidates, boolean checkForCircularImports) {
if (importCandidates.isEmpty()) {
return;
@@ -1033,9 +1033,9 @@ class ConfigurationClassParser {
public CircularImportProblem(ConfigurationClass attemptedImport, Deque<ConfigurationClass> importStack) {
super(String.format("A circular @Import has been detected: " +
"Illegal attempt by @Configuration class '%s' to import class '%s' as '%s' is " +
"already present in the current import stack %s", importStack.peek().getSimpleName(),
"already present in the current import stack %s", importStack.element().getSimpleName(),
attemptedImport.getSimpleName(), attemptedImport.getSimpleName(), importStack),
new Location(importStack.peek().getResource(), attemptedImport.getMetadata()));
new Location(importStack.element().getResource(), attemptedImport.getMetadata()));
}
}

View File

@@ -366,7 +366,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
payloadType != null && declaredEventType.isAssignableFrom(payloadType)) {
return declaredEventType;
}
if (declaredEventType.getRawClass().isInstance(event)) {
if (eventClass != null && eventClass.isInstance(event)) {
return declaredEventType;
}
}