master
Sam Brannen 12 years ago
parent 70b0b97b54
commit c795c1b362
  1. 6
      spring-core/src/main/java/org/springframework/core/SpringFactoriesLoader.java
  2. 2
      spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java

@ -41,7 +41,7 @@ import org.springframework.util.StringUtils;
* from a given file location. If a location is not given, the {@linkplain * from a given file location. If a location is not given, the {@linkplain
* #DEFAULT_FACTORIES_LOCATION default location} is used. * #DEFAULT_FACTORIES_LOCATION default location} is used.
* *
* <p>The file should be in {@link Properties} format, where the keys is the fully * <p>The file should be in {@link Properties} format, where the key is the fully
* qualified interface or abstract class name, and the value is a comma separated list of * qualified interface or abstract class name, and the value is a comma separated list of
* implementations. For instance: * implementations. For instance:
* <pre class="code"> * <pre class="code">
@ -119,7 +119,7 @@ public abstract class SpringFactoriesLoader {
return result; return result;
} }
private static List<String> loadFactoryNames(Class factoryClass, private static List<String> loadFactoryNames(Class<?> factoryClass,
ClassLoader classLoader, ClassLoader classLoader,
String factoriesLocation) { String factoriesLocation) {
@ -127,7 +127,7 @@ public abstract class SpringFactoriesLoader {
try { try {
List<String> result = new ArrayList<String>(); List<String> result = new ArrayList<String>();
Enumeration urls = classLoader.getResources(factoriesLocation); Enumeration<URL> urls = classLoader.getResources(factoriesLocation);
while (urls.hasMoreElements()) { while (urls.hasMoreElements()) {
URL url = (URL) urls.nextElement(); URL url = (URL) urls.nextElement();
Properties properties = Properties properties =

@ -204,6 +204,8 @@ public class EmbeddedDatabaseFactory {
return this.dataSource.isWrapperFor(iface); return this.dataSource.isWrapperFor(iface);
} }
// getParentLogger() is required for JDBC 4.1 compatibility
@SuppressWarnings("unused")
public Logger getParentLogger() { public Logger getParentLogger() {
return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
} }

Loading…
Cancel
Save