prefer use of varargs over arrays in bean property setters (for programmatic consumption)
This commit is contained in:
parent
c17df6db8a
commit
9f3026a4e6
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2011 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.
|
||||
|
|
@ -136,7 +136,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
|
|||
* Spring's component-scan configuration for regular Spring components
|
||||
* @see #setPersistenceUnitManager
|
||||
*/
|
||||
public void setPackagesToScan(String[] packagesToScan) {
|
||||
public void setPackagesToScan(String... packagesToScan) {
|
||||
this.internalPersistenceUnitManager.setPackagesToScan(packagesToScan);
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
|
|||
* <p><b>NOTE: Only applied if no external PersistenceUnitManager specified.</b>
|
||||
* @see #setPersistenceUnitManager
|
||||
*/
|
||||
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor[] postProcessors) {
|
||||
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) {
|
||||
this.internalPersistenceUnitManager.setPersistenceUnitPostProcessors(postProcessors);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public class DefaultPersistenceUnitManager
|
|||
* @param persistenceXmlLocations an array of Spring resource Strings
|
||||
* identifying the location of the <code>persistence.xml</code> files to read
|
||||
*/
|
||||
public void setPersistenceXmlLocations(String[] persistenceXmlLocations) {
|
||||
public void setPersistenceXmlLocations(String... persistenceXmlLocations) {
|
||||
this.persistenceXmlLocations = persistenceXmlLocations;
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ public class DefaultPersistenceUnitManager
|
|||
* classes in the classpath. This is analogous to Spring's component-scan feature
|
||||
* ({@link org.springframework.context.annotation.ClassPathBeanDefinitionScanner}).
|
||||
*/
|
||||
public void setPackagesToScan(String[] packagesToScan) {
|
||||
public void setPackagesToScan(String... packagesToScan) {
|
||||
this.packagesToScan = packagesToScan;
|
||||
}
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ public class DefaultPersistenceUnitManager
|
|||
* classes and jar files, in addition to the metadata read in from
|
||||
* <code>persistence.xml</code>.
|
||||
*/
|
||||
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor[] postProcessors) {
|
||||
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) {
|
||||
this.persistenceUnitPostProcessors = postProcessors;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue