for (String locator : locators) {
Matcher m = LOCATOR.matcher(locator);
if (m.matches()) {
String host = m.group(1).trim();
int port = parsePort(connectionUrl, m.group(2).trim());
parsedUrls.add(new SimpleJdbcUrlMetaData(host, port, null, connectionUrl, vendorName));
}
}
}
break;
}
}
} else if (multiMatcher.find() && multiMatcher.groupCount() == 1) {
int port = parsePort(connectionUrl, multiMatcher.group(1).trim());
if (port != 0) {
JdbcUrlMetaData simpleJdbcUrlMetaData = new SimpleJdbcUrlMetaData("", port, null, connectionUrl, vendorName);
parsedUrls.add(simpleJdbcUrlMetaData);
}
}
return parsedUrls.isEmpty() ? null : parsedUrls;