Polishing

This commit is contained in:
Juergen Hoeller
2018-02-13 14:20:07 +01:00
parent f93ca28884
commit 0030ff8711
12 changed files with 83 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 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.
@@ -44,7 +44,7 @@ public final class ParserContext {
private BeanDefinition containingBeanDefinition;
private final Stack<ComponentDefinition> containingComponents = new Stack<ComponentDefinition>();
private final Stack<CompositeComponentDefinition> containingComponents = new Stack<CompositeComponentDefinition>();
public ParserContext(XmlReaderContext readerContext, BeanDefinitionParserDelegate delegate) {
@@ -90,8 +90,7 @@ public final class ParserContext {
}
public CompositeComponentDefinition getContainingComponent() {
return (!this.containingComponents.isEmpty() ?
(CompositeComponentDefinition) this.containingComponents.lastElement() : null);
return (!this.containingComponents.isEmpty() ? this.containingComponents.lastElement() : null);
}
public void pushContainingComponent(CompositeComponentDefinition containingComponent) {
@@ -99,7 +98,7 @@ public final class ParserContext {
}
public CompositeComponentDefinition popContainingComponent() {
return (CompositeComponentDefinition) this.containingComponents.pop();
return this.containingComponents.pop();
}
public void popAndRegisterContainingComponent() {