Simplify conditionals
See gh-39259
This commit is contained in:
committed by
Phillip Webb
parent
def7523398
commit
65a1ff84e6
@@ -61,8 +61,8 @@ class NotConstructorBoundInjectionFailureAnalyzer
|
||||
}
|
||||
|
||||
private boolean isConstructorBindingConfigurationProperties(InjectionPoint injectionPoint) {
|
||||
return (injectionPoint != null && injectionPoint.getMember() instanceof Constructor<?> constructor)
|
||||
? isConstructorBindingConfigurationProperties(constructor) : false;
|
||||
return injectionPoint != null && injectionPoint.getMember() instanceof Constructor<?> constructor
|
||||
&& isConstructorBindingConfigurationProperties(constructor);
|
||||
}
|
||||
|
||||
private boolean isConstructorBindingConfigurationProperties(Constructor<?> constructor) {
|
||||
|
||||
@@ -127,7 +127,7 @@ class DefaultBindConstructorProvider implements BindConstructorProvider {
|
||||
return true;
|
||||
}
|
||||
Class<?> userClass = ClassUtils.getUserClass(type);
|
||||
return (userClass != type) ? isAutowiredPresent(userClass) : false;
|
||||
return userClass != type && isAutowiredPresent(userClass);
|
||||
}
|
||||
|
||||
private static Constructor<?>[] getCandidateConstructors(Class<?> type) {
|
||||
|
||||
@@ -53,7 +53,7 @@ final class SpringProfileArbiter implements Arbiter {
|
||||
|
||||
@Override
|
||||
public boolean isCondition() {
|
||||
return (this.environment != null) ? this.environment.acceptsProfiles(this.profiles) : false;
|
||||
return this.environment != null && this.environment.acceptsProfiles(this.profiles);
|
||||
}
|
||||
|
||||
@PluginBuilderFactory
|
||||
|
||||
@@ -124,7 +124,7 @@ class NestedJarResourceSet extends AbstractSingleArchiveResourceSet {
|
||||
// JarFile.isMultiRelease() is final so we must go to the manifest
|
||||
Manifest manifest = getManifest();
|
||||
Attributes attributes = (manifest != null) ? manifest.getMainAttributes() : null;
|
||||
this.multiRelease = (attributes != null) ? attributes.containsKey(MULTI_RELEASE) : false;
|
||||
this.multiRelease = attributes != null && attributes.containsKey(MULTI_RELEASE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user