Remove redundant casts

See gh-12011
This commit is contained in:
igor-suhorukov
2018-02-13 00:42:51 +03:00
committed by Stephane Nicoll
parent 74cede5cdc
commit 71351de694
7 changed files with 7 additions and 10 deletions

View File

@@ -359,7 +359,7 @@ public final class ConditionMessage {
*/
public ConditionMessage items(Style style, Object... items) {
return items(style,
items == null ? (Collection<?>) null : Arrays.asList(items));
items == null ? null : Arrays.asList(items));
}
/**

View File

@@ -265,8 +265,7 @@ public class FlywayAutoConfiguration {
private DatabaseDriver getDatabaseDriver() {
try {
String url = (String) JdbcUtils.extractDatabaseMetaData(this.dataSource,
"getURL");
String url = JdbcUtils.extractDatabaseMetaData(this.dataSource, "getURL");
return DatabaseDriver.fromJdbcUrl(url);
}
catch (MetaDataAccessException ex) {

View File

@@ -69,7 +69,7 @@ final class DatabaseLookup {
return Database.DEFAULT;
}
try {
String url = (String) JdbcUtils.extractDatabaseMetaData(dataSource, "getURL");
String url = JdbcUtils.extractDatabaseMetaData(dataSource, "getURL");
DatabaseDriver driver = DatabaseDriver.fromJdbcUrl(url);
Database database = LOOKUP.get(driver);
if (database != null) {