Polishing

This commit is contained in:
Juergen Hoeller
2020-01-09 17:03:17 +01:00
parent e8ef93c508
commit 4936a637fe
4 changed files with 14 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -107,7 +107,7 @@ final class DefaultPathContainer implements PathContainer {
}
List<Element> elements = new ArrayList<>();
int begin;
if (path.length() > 0 && path.charAt(0) == separator) {
if (path.charAt(0) == separator) {
begin = 1;
elements.add(separatorElement);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -149,7 +149,7 @@ public class ControllerAdviceBean implements Ordered {
public int getOrder() {
if (this.order == null) {
Object resolvedBean = null;
if (this.beanOrName instanceof String) {
if (this.beanFactory != null && this.beanOrName instanceof String) {
String beanName = (String) this.beanOrName;
String targetBeanName = ScopedProxyUtils.getTargetBeanName(beanName);
boolean isScopedProxy = this.beanFactory.containsBean(targetBeanName);