expect user name to be null (SPR-7228)

master
Juergen Hoeller 15 years ago
parent d7f72fbbd4
commit 66aca1e8b3
  1. 11
      org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/metadata/Db2CallMetaDataProvider.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2007 the original author or authors. * Copyright 2002-2010 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.
@ -24,6 +24,7 @@ import java.sql.SQLException;
* This class is intended for internal use by the Simple JDBC classes. * This class is intended for internal use by the Simple JDBC classes.
* *
* @author Thomas Risberg * @author Thomas Risberg
* @author Juergen Hoeller
* @since 2.5 * @since 2.5
*/ */
public class Db2CallMetaDataProvider extends GenericCallMetaDataProvider { public class Db2CallMetaDataProvider extends GenericCallMetaDataProvider {
@ -63,8 +64,12 @@ public class Db2CallMetaDataProvider extends GenericCallMetaDataProvider {
@Override @Override
public String metaDataSchemaNameToUse(String schemaName) { public String metaDataSchemaNameToUse(String schemaName) {
// Use current user schema if no schema specified if (schemaName != null) {
return schemaName == null ? getUserName().toUpperCase() : super.metaDataSchemaNameToUse(schemaName); return super.metaDataSchemaNameToUse(schemaName);
}
// Use current user schema if no schema specified...
String userName = getUserName();
return (userName != null ? userName.toUpperCase() : null);
} }
} }

Loading…
Cancel
Save