diff --git a/spring-cloud-cloudfoundry-connector/src/test/java/org/springframework/cloud/cloudfoundry/CloudFoundryConnectorOracleServiceTest.java b/spring-cloud-cloudfoundry-connector/src/test/java/org/springframework/cloud/cloudfoundry/CloudFoundryConnectorOracleServiceTest.java index e96881e..6d55509 100644 --- a/spring-cloud-cloudfoundry-connector/src/test/java/org/springframework/cloud/cloudfoundry/CloudFoundryConnectorOracleServiceTest.java +++ b/spring-cloud-cloudfoundry-connector/src/test/java/org/springframework/cloud/cloudfoundry/CloudFoundryConnectorOracleServiceTest.java @@ -33,21 +33,6 @@ public class CloudFoundryConnectorOracleServiceTest extends AbstractUserProvided assertUriBasedServiceInfoFields(info, ORACLE_SCHEME, hostname, port, username, password, INSTANCE_NAME); } - @Test - public void oracleServiceCreationWithSpecialChars() { - String userWithSpecialChars = "u%u:u+"; - String passwordWithSpecialChars = "p%p:p+"; - when(mockEnvironment.getEnvValue("VCAP_SERVICES")) - .thenReturn(getServicesPayload( - getUserProvidedServicePayload(SERVICE_NAME, hostname, port, userWithSpecialChars, passwordWithSpecialChars, INSTANCE_NAME, ORACLE_SCHEME + ":"))); - List serviceInfos = testCloudConnector.getServiceInfos(); - - ServiceInfo info = getServiceInfo(serviceInfos, SERVICE_NAME); - assertServiceFoundOfType(info, OracleServiceInfo.class); - assertEquals(getJdbcUrl(hostname, port, INSTANCE_NAME, userWithSpecialChars, passwordWithSpecialChars), ((RelationalServiceInfo)info).getJdbcUrl()); - assertUriBasedServiceInfoFields(info, ORACLE_SCHEME, hostname, port, userWithSpecialChars, passwordWithSpecialChars, INSTANCE_NAME); - } - @Test public void oracleServiceCreationWithNoUri() { when(mockEnvironment.getEnvValue("VCAP_SERVICES")) diff --git a/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/OracleServiceInfo.java b/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/OracleServiceInfo.java index be5782f..71827b1 100644 --- a/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/OracleServiceInfo.java +++ b/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/OracleServiceInfo.java @@ -18,7 +18,7 @@ public class OracleServiceInfo extends RelationalServiceInfo { @Override protected String buildJdbcUrl() { return String.format("jdbc:%s:thin:%s/%s@%s:%d/%s", - jdbcUrlDatabaseType, UriInfo.urlEncode(getUserName()), UriInfo.urlEncode(getPassword()), + jdbcUrlDatabaseType, getUserName(), getPassword(), getHost(), getPort(), getPath()); } }