Improve whitespace handling in oracle jdbc url parser (#12512)
This commit is contained in:
parent
e3dc096ac3
commit
ca44975c3b
|
@ -530,10 +530,12 @@ public enum JdbcConnectionUrlParser {
|
|||
},
|
||||
|
||||
ORACLE_AT() {
|
||||
private final Pattern descriptionPattern = Pattern.compile("@\\s*\\(\\s*description");
|
||||
|
||||
@Override
|
||||
@CanIgnoreReturnValue
|
||||
DbInfo.Builder doParse(String jdbcUrl, DbInfo.Builder builder) {
|
||||
if (jdbcUrl.contains("@(description")) {
|
||||
if (descriptionPattern.matcher(jdbcUrl).find()) {
|
||||
return ORACLE_AT_DESCRIPTION.doParse(jdbcUrl, builder);
|
||||
}
|
||||
String user;
|
||||
|
@ -565,7 +567,7 @@ public enum JdbcConnectionUrlParser {
|
|||
|
||||
/**
|
||||
* This parser can locate incorrect data if multiple addresses are defined but not everything is
|
||||
* defined in the first block. (It would locate data from subsequent address blocks.
|
||||
* defined in the first block. It would locate data from subsequent address blocks.
|
||||
*/
|
||||
ORACLE_AT_DESCRIPTION() {
|
||||
private final Pattern hostPattern = Pattern.compile("\\(\\s*host\\s*=\\s*([^ )]+)\\s*\\)");
|
||||
|
|
Loading…
Reference in New Issue