Skip to content

Commit 48fcaca

Browse files
committed
Merge pull request #15841 from mrotteveel
* pr/15841: Polish "Add support for jdbc:firebird: url prefix" Add support for jdbc:firebird: url prefix
2 parents 7e51e1a + 82f33ad commit 48fcaca

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -140,7 +140,7 @@ protected boolean matchProductName(String productName) {
140140

141141
@Override
142142
protected Collection<String> getUrlPrefixes() {
143-
return Collections.singleton("firebirdsql");
143+
return Arrays.asList("firebirdsql", "firebird");
144144
}
145145

146146
@Override

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -129,6 +129,8 @@ public void databaseJdbcUrlLookups() {
129129
.isEqualTo(DatabaseDriver.SQLSERVER);
130130
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:firebirdsql://localhost/sample"))
131131
.isEqualTo(DatabaseDriver.FIREBIRD);
132+
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:firebird://localhost/sample"))
133+
.isEqualTo(DatabaseDriver.FIREBIRD);
132134
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:db2://localhost:50000/sample "))
133135
.isEqualTo(DatabaseDriver.DB2);
134136
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:as400://localhost"))

0 commit comments

Comments
 (0)