Merge pull request #1979 from rupertw

* pr/1979:
  Fix formatting
This commit is contained in:
Stephane Nicoll
2018-10-05 09:21:23 +02:00
14 changed files with 24 additions and 24 deletions

View File

@@ -707,7 +707,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
ReflectionUtils.makeAccessible(method); ReflectionUtils.makeAccessible(method);
method.invoke(bean, arguments); method.invoke(bean, arguments);
} }
catch (InvocationTargetException ex){ catch (InvocationTargetException ex) {
throw ex.getTargetException(); throw ex.getTargetException();
} }
} }

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ public class BeanExpressionContext {
if (this.beanFactory.containsBean(key)) { if (this.beanFactory.containsBean(key)) {
return this.beanFactory.getBean(key); return this.beanFactory.getBean(key);
} }
else if (this.scope != null){ else if (this.scope != null) {
return this.scope.resolveContextualObject(key); return this.scope.resolveContextualObject(key);
} }
else { else {

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@@ -132,7 +132,7 @@ public class PropertyOverrideConfigurer extends PropertyResourceConfigurer {
"': expected 'beanName" + this.beanNameSeparator + "property'"); "': expected 'beanName" + this.beanNameSeparator + "property'");
} }
String beanName = key.substring(0, separatorIndex); String beanName = key.substring(0, separatorIndex);
String beanProperty = key.substring(separatorIndex+1); String beanProperty = key.substring(separatorIndex + 1);
this.beanNames.add(beanName); this.beanNames.add(beanName);
applyPropertyValue(factory, beanName, beanProperty, value); applyPropertyValue(factory, beanName, beanProperty, value);
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {

View File

@@ -661,7 +661,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
@Override @Override
@Nullable @Nullable
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType) public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
throws NoSuchBeanDefinitionException{ throws NoSuchBeanDefinitionException {
A ann = null; A ann = null;
Class<?> beanType = getType(beanName); Class<?> beanType = getType(beanName);

View File

@@ -510,7 +510,7 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
* Reads the value of the entry. Correctly interprets bean references for * Reads the value of the entry. Correctly interprets bean references for
* values that are prefixed with an asterisk. * values that are prefixed with an asterisk.
*/ */
private Object readValue(Map.Entry<? ,?> entry) { private Object readValue(Map.Entry<?, ?> entry) {
Object val = entry.getValue(); Object val = entry.getValue();
if (val instanceof String) { if (val instanceof String) {
String strVal = (String) val; String strVal = (String) val;

View File

@@ -432,7 +432,7 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
@Override @Override
@Nullable @Nullable
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType) public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
throws NoSuchBeanDefinitionException{ throws NoSuchBeanDefinitionException {
Class<?> beanType = getType(beanName); Class<?> beanType = getType(beanName);
return (beanType != null ? AnnotationUtils.findAnnotation(beanType, annotationType) : null); return (beanType != null ? AnnotationUtils.findAnnotation(beanType, annotationType) : null);

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -118,7 +118,7 @@ public class SimpleConstructorNamespaceHandler implements NamespaceHandler {
"Constructor argument '" + argName + "' specifies a negative index", attr); "Constructor argument '" + argName + "' specifies a negative index", attr);
} }
if (cvs.hasIndexedArgumentValue(index)){ if (cvs.hasIndexedArgumentValue(index)) {
parserContext.getReaderContext().error( parserContext.getReaderContext().error(
"Constructor argument '" + argName + "' with index "+ index+" already defined using <constructor-arg>." + "Constructor argument '" + argName + "' with index "+ index+" already defined using <constructor-arg>." +
" Only one approach may be used per argument.", attr); " Only one approach may be used per argument.", attr);
@@ -130,7 +130,7 @@ public class SimpleConstructorNamespaceHandler implements NamespaceHandler {
// no escaping -> ctr name // no escaping -> ctr name
else { else {
String name = Conventions.attributeNameToPropertyName(argName); String name = Conventions.attributeNameToPropertyName(argName);
if (containsArgWithName(name, cvs)){ if (containsArgWithName(name, cvs)) {
parserContext.getReaderContext().error( parserContext.getReaderContext().error(
"Constructor argument '" + argName + "' already defined using <constructor-arg>." + "Constructor argument '" + argName + "' already defined using <constructor-arg>." +
" Only one approach may be used per argument.", attr); " Only one approach may be used per argument.", attr);

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2012 the original author or authors. * Copyright 2002-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2015 the original author or authors. * Copyright 2002-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ abstract class UpdateMessageDigestInputStream extends InputStream {
*/ */
public void updateMessageDigest(MessageDigest messageDigest) throws IOException { public void updateMessageDigest(MessageDigest messageDigest) throws IOException {
int data; int data;
while ((data = read()) != -1){ while ((data = read()) != -1) {
messageDigest.update((byte) data); messageDigest.update((byte) data);
} }
} }
@@ -54,7 +54,7 @@ abstract class UpdateMessageDigestInputStream extends InputStream {
public void updateMessageDigest(MessageDigest messageDigest, int len) throws IOException { public void updateMessageDigest(MessageDigest messageDigest, int len) throws IOException {
int data; int data;
int bytesRead = 0; int bytesRead = 0;
while (bytesRead < len && (data = read()) != -1){ while (bytesRead < len && (data = read()) != -1) {
messageDigest.update((byte) data); messageDigest.update((byte) data);
bytesRead++; bytesRead++;
} }