polishing

This commit is contained in:
Juergen Hoeller 2009-05-20 00:31:00 +00:00
parent a3af9e7330
commit e70d2ce14c
2 changed files with 4 additions and 5 deletions

View File

@ -543,8 +543,7 @@ public class PersistenceAnnotationBeanPostProcessor extends JndiLocatorSupport
PersistenceProperty[] pps = pc.properties(); PersistenceProperty[] pps = pc.properties();
if (!ObjectUtils.isEmpty(pps)) { if (!ObjectUtils.isEmpty(pps)) {
properties = new Properties(); properties = new Properties();
for (int i = 0; i < pps.length; i++) { for (PersistenceProperty pp : pps) {
PersistenceProperty pp = pps[i];
properties.setProperty(pp.name(), pp.value()); properties.setProperty(pp.name(), pp.value());
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2007 the original author or authors. * Copyright 2002-2009 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.
@ -121,8 +121,8 @@ public class XmlWebApplicationContext extends AbstractRefreshableWebApplicationC
protected void loadBeanDefinitions(XmlBeanDefinitionReader reader) throws BeansException, IOException { protected void loadBeanDefinitions(XmlBeanDefinitionReader reader) throws BeansException, IOException {
String[] configLocations = getConfigLocations(); String[] configLocations = getConfigLocations();
if (configLocations != null) { if (configLocations != null) {
for (int i = 0; i < configLocations.length; i++) { for (String configLocation : configLocations) {
reader.loadBeanDefinitions(configLocations[i]); reader.loadBeanDefinitions(configLocation);
} }
} }
} }