Use consistent block style

Update all code to use a consistent block style.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-20 17:22:42 -07:00
committed by Juergen Hoeller
parent 04a8c285df
commit 866e9d702e
14 changed files with 111 additions and 44 deletions

View File

@@ -371,8 +371,9 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
}
else if ("ref".equals(name)) {
String refName;
if (args[0] == null)
if (args[0] == null) {
throw new IllegalArgumentException("Argument to ref() is not a valid bean or was not found");
}
if (args[0] instanceof RuntimeBeanReference) {
refName = ((RuntimeBeanReference) args[0]).getBeanName();

View File

@@ -211,8 +211,9 @@ class GroovyBeanDefinitionWrapper extends GroovyObjectSupport {
}
// factoryMethod
else if (FACTORY_METHOD.equals(property)) {
if (newValue != null)
if (newValue != null) {
bd.setFactoryMethodName(newValue.toString());
}
}
// initMethod
else if (INIT_METHOD.equals(property)) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -1124,33 +1124,79 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
AbstractBeanDefinition that = (AbstractBeanDefinition) other;
if (!ObjectUtils.nullSafeEquals(getBeanClassName(), that.getBeanClassName())) return false;
if (!ObjectUtils.nullSafeEquals(this.scope, that.scope)) return false;
if (this.abstractFlag != that.abstractFlag) return false;
if (this.lazyInit != that.lazyInit) return false;
if (!ObjectUtils.nullSafeEquals(getBeanClassName(), that.getBeanClassName())) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.scope, that.scope)) {
return false;
}
if (this.abstractFlag != that.abstractFlag) {
return false;
}
if (this.lazyInit != that.lazyInit) {
return false;
}
if (this.autowireMode != that.autowireMode) return false;
if (this.dependencyCheck != that.dependencyCheck) return false;
if (!Arrays.equals(this.dependsOn, that.dependsOn)) return false;
if (this.autowireCandidate != that.autowireCandidate) return false;
if (!ObjectUtils.nullSafeEquals(this.qualifiers, that.qualifiers)) return false;
if (this.primary != that.primary) return false;
if (this.autowireMode != that.autowireMode) {
return false;
}
if (this.dependencyCheck != that.dependencyCheck) {
return false;
}
if (!Arrays.equals(this.dependsOn, that.dependsOn)) {
return false;
}
if (this.autowireCandidate != that.autowireCandidate) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.qualifiers, that.qualifiers)) {
return false;
}
if (this.primary != that.primary) {
return false;
}
if (this.nonPublicAccessAllowed != that.nonPublicAccessAllowed) return false;
if (this.lenientConstructorResolution != that.lenientConstructorResolution) return false;
if (!ObjectUtils.nullSafeEquals(this.constructorArgumentValues, that.constructorArgumentValues)) return false;
if (!ObjectUtils.nullSafeEquals(this.propertyValues, that.propertyValues)) return false;
if (!ObjectUtils.nullSafeEquals(this.methodOverrides, that.methodOverrides)) return false;
if (this.nonPublicAccessAllowed != that.nonPublicAccessAllowed) {
return false;
}
if (this.lenientConstructorResolution != that.lenientConstructorResolution) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.constructorArgumentValues, that.constructorArgumentValues)) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.propertyValues, that.propertyValues)) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.methodOverrides, that.methodOverrides)) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.factoryBeanName, that.factoryBeanName)) return false;
if (!ObjectUtils.nullSafeEquals(this.factoryMethodName, that.factoryMethodName)) return false;
if (!ObjectUtils.nullSafeEquals(this.initMethodName, that.initMethodName)) return false;
if (this.enforceInitMethod != that.enforceInitMethod) return false;
if (!ObjectUtils.nullSafeEquals(this.destroyMethodName, that.destroyMethodName)) return false;
if (this.enforceDestroyMethod != that.enforceDestroyMethod) return false;
if (!ObjectUtils.nullSafeEquals(this.factoryBeanName, that.factoryBeanName)) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.factoryMethodName, that.factoryMethodName)) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.initMethodName, that.initMethodName)) {
return false;
}
if (this.enforceInitMethod != that.enforceInitMethod) {
return false;
}
if (!ObjectUtils.nullSafeEquals(this.destroyMethodName, that.destroyMethodName)) {
return false;
}
if (this.enforceDestroyMethod != that.enforceDestroyMethod) {
return false;
}
if (this.synthetic != that.synthetic) return false;
if (this.role != that.role) return false;
if (this.synthetic != that.synthetic) {
return false;
}
if (this.role != that.role) {
return false;
}
return super.equals(other);
}