parent
def7523398
commit
65a1ff84e6
|
@ -68,7 +68,7 @@ class OperationMethodParameter implements OperationParameter {
|
||||||
if (!ObjectUtils.isEmpty(this.parameter.getAnnotationsByType(Nullable.class))) {
|
if (!ObjectUtils.isEmpty(this.parameter.getAnnotationsByType(Nullable.class))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return (jsr305Present) ? new Jsr305().isMandatory(this.parameter) : true;
|
return !jsr305Present || new Jsr305().isMandatory(this.parameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class ClassLoaderFile implements Serializable {
|
||||||
*/
|
*/
|
||||||
public ClassLoaderFile(Kind kind, long lastModified, byte[] contents) {
|
public ClassLoaderFile(Kind kind, long lastModified, byte[] contents) {
|
||||||
Assert.notNull(kind, "Kind must not be null");
|
Assert.notNull(kind, "Kind must not be null");
|
||||||
Assert.isTrue((kind != Kind.DELETED) ? contents != null : contents == null,
|
Assert.isTrue((kind != Kind.DELETED) == (contents != null),
|
||||||
() -> "Contents must " + ((kind != Kind.DELETED) ? "not " : "") + "be null");
|
() -> "Contents must " + ((kind != Kind.DELETED) ? "not " : "") + "be null");
|
||||||
this.kind = kind;
|
this.kind = kind;
|
||||||
this.lastModified = lastModified;
|
this.lastModified = lastModified;
|
||||||
|
|
|
@ -44,7 +44,7 @@ class OverrideAutoConfigurationContextCustomizerFactory implements ContextCustom
|
||||||
}
|
}
|
||||||
OverrideAutoConfiguration overrideAutoConfiguration = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
OverrideAutoConfiguration overrideAutoConfiguration = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
||||||
OverrideAutoConfiguration.class);
|
OverrideAutoConfiguration.class);
|
||||||
boolean enabled = (overrideAutoConfiguration != null) ? overrideAutoConfiguration.enabled() : true;
|
boolean enabled = overrideAutoConfiguration == null || overrideAutoConfiguration.enabled();
|
||||||
return !enabled ? new DisableAutoConfigurationContextCustomizer() : null;
|
return !enabled ? new DisableAutoConfigurationContextCustomizer() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ final class JarUrlConnection extends java.net.JarURLConnection {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getAllowUserInteraction() {
|
public boolean getAllowUserInteraction() {
|
||||||
return (this.jarFileConnection != null) ? this.jarFileConnection.getAllowUserInteraction() : false;
|
return this.jarFileConnection != null && this.jarFileConnection.getAllowUserInteraction();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -219,7 +219,7 @@ final class JarUrlConnection extends java.net.JarURLConnection {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getUseCaches() {
|
public boolean getUseCaches() {
|
||||||
return (this.jarFileConnection != null) ? this.jarFileConnection.getUseCaches() : true;
|
return this.jarFileConnection == null || this.jarFileConnection.getUseCaches();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -231,7 +231,7 @@ final class JarUrlConnection extends java.net.JarURLConnection {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getDefaultUseCaches() {
|
public boolean getDefaultUseCaches() {
|
||||||
return (this.jarFileConnection != null) ? this.jarFileConnection.getDefaultUseCaches() : true;
|
return this.jarFileConnection == null || this.jarFileConnection.getDefaultUseCaches();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -61,8 +61,8 @@ class NotConstructorBoundInjectionFailureAnalyzer
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isConstructorBindingConfigurationProperties(InjectionPoint injectionPoint) {
|
private boolean isConstructorBindingConfigurationProperties(InjectionPoint injectionPoint) {
|
||||||
return (injectionPoint != null && injectionPoint.getMember() instanceof Constructor<?> constructor)
|
return injectionPoint != null && injectionPoint.getMember() instanceof Constructor<?> constructor
|
||||||
? isConstructorBindingConfigurationProperties(constructor) : false;
|
&& isConstructorBindingConfigurationProperties(constructor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isConstructorBindingConfigurationProperties(Constructor<?> constructor) {
|
private boolean isConstructorBindingConfigurationProperties(Constructor<?> constructor) {
|
||||||
|
|
|
@ -127,7 +127,7 @@ class DefaultBindConstructorProvider implements BindConstructorProvider {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Class<?> userClass = ClassUtils.getUserClass(type);
|
Class<?> userClass = ClassUtils.getUserClass(type);
|
||||||
return (userClass != type) ? isAutowiredPresent(userClass) : false;
|
return userClass != type && isAutowiredPresent(userClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Constructor<?>[] getCandidateConstructors(Class<?> type) {
|
private static Constructor<?>[] getCandidateConstructors(Class<?> type) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ final class SpringProfileArbiter implements Arbiter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCondition() {
|
public boolean isCondition() {
|
||||||
return (this.environment != null) ? this.environment.acceptsProfiles(this.profiles) : false;
|
return this.environment != null && this.environment.acceptsProfiles(this.profiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PluginBuilderFactory
|
@PluginBuilderFactory
|
||||||
|
|
|
@ -124,7 +124,7 @@ class NestedJarResourceSet extends AbstractSingleArchiveResourceSet {
|
||||||
// JarFile.isMultiRelease() is final so we must go to the manifest
|
// JarFile.isMultiRelease() is final so we must go to the manifest
|
||||||
Manifest manifest = getManifest();
|
Manifest manifest = getManifest();
|
||||||
Attributes attributes = (manifest != null) ? manifest.getMainAttributes() : null;
|
Attributes attributes = (manifest != null) ? manifest.getMainAttributes() : null;
|
||||||
this.multiRelease = (attributes != null) ? attributes.containsKey(MULTI_RELEASE) : false;
|
this.multiRelease = attributes != null && attributes.containsKey(MULTI_RELEASE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue