Browse Source

Fix invalid characters in source files

Closes gh-27475
pull/28694/head
Juergen Hoeller 4 years ago
parent
commit
b01a3aeb6b
  1. 4
      spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
  2. 6
      spring-expression/src/main/java/org/springframework/expression/BeanResolver.java
  3. 7
      spring-expression/src/main/java/org/springframework/expression/TypeComparator.java
  4. 10
      spring-expression/src/main/java/org/springframework/expression/spel/ast/BeanReference.java

4
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -350,7 +350,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp @@ -350,7 +350,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
else {
String scopeName = mbd.getScope();
if (!StringUtils.hasLength(scopeName)) {
throw new IllegalStateException("No scope name defined for bean ´" + beanName + "'");
throw new IllegalStateException("No scope name defined for bean '" + beanName + "'");
}
Scope scope = this.scopes.get(scopeName);
if (scope == null) {

6
spring-expression/src/main/java/org/springframework/expression/BeanResolver.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2021 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.
@ -19,7 +19,7 @@ package org.springframework.expression; @@ -19,7 +19,7 @@ package org.springframework.expression;
/**
* A bean resolver can be registered with the evaluation context and will kick in
* for bean references: {@code @myBeanName} and {@code &myBeanName} expressions.
* The <tt>&</tt> variant syntax allows access to the factory bean where relevant.
* The {@code &} variant syntax allows access to the factory bean where relevant.
*
* @author Andy Clement
* @since 3.0.3
@ -28,7 +28,7 @@ public interface BeanResolver { @@ -28,7 +28,7 @@ public interface BeanResolver {
/**
* Look up a bean by the given name and return a corresponding instance for it.
* For attempting access to a factory bean, the name needs a <tt>&</tt> prefix.
* For attempting access to a factory bean, the name needs a {@code &} prefix.
* @param context the current evaluation context
* @param beanName the name of the bean to look up
* @return an object representing the bean

7
spring-expression/src/main/java/org/springframework/expression/TypeComparator.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2021 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.
@ -40,10 +40,11 @@ public interface TypeComparator { @@ -40,10 +40,11 @@ public interface TypeComparator {
* Compare two given objects.
* @param firstObject the first object
* @param secondObject the second object
* @return 0 if they are equal, <0 if the first is smaller than the second,
* or >0 if the first is larger than the second
* @return 0 if they are equal, a negative integer if the first is smaller than
* the second, or a positive integer if the first is larger than the second
* @throws EvaluationException if a problem occurs during comparison
* (or if they are not comparable in the first place)
* @see Comparable#compareTo
*/
int compare(@Nullable Object firstObject, @Nullable Object secondObject) throws EvaluationException;

10
spring-expression/src/main/java/org/springframework/expression/spel/ast/BeanReference.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@ -25,8 +25,8 @@ import org.springframework.expression.spel.SpelEvaluationException; @@ -25,8 +25,8 @@ import org.springframework.expression.spel.SpelEvaluationException;
import org.springframework.expression.spel.SpelMessage;
/**
* Represents a bean reference to a type, for example <tt>@foo</tt> or <tt>@'foo.bar'</tt>.
* For a FactoryBean the syntax <tt>&foo</tt> can be used to access the factory itself.
* Represents a bean reference to a type, for example {@code @foo} or {@code @'foo.bar'}.
* For a FactoryBean the syntax {@code &foo} can be used to access the factory itself.
*
* @author Andy Clement
*/
@ -64,13 +64,13 @@ public class BeanReference extends SpelNodeImpl { @@ -64,13 +64,13 @@ public class BeanReference extends SpelNodeImpl {
public String toStringAST() {
StringBuilder sb = new StringBuilder();
if (!this.beanName.startsWith(FACTORY_BEAN_PREFIX)) {
sb.append("@");
sb.append('@');
}
if (!this.beanName.contains(".")) {
sb.append(this.beanName);
}
else {
sb.append("'").append(this.beanName).append("'");
sb.append('\'').append(this.beanName).append('\'');
}
return sb.toString();
}

Loading…
Cancel
Save