diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index 547c9c44c..f8e168c5f 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -123,4 +123,8 @@ com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection com.google.cloud.spanner.DatabaseId getDatabaseId() + + 8001 + com/google/cloud/spanner/connection/ConnectionPropertiesHelper + diff --git a/pom.xml b/pom.xml index c71d11476..c50b1e077 100644 --- a/pom.xml +++ b/pom.xml @@ -351,7 +351,7 @@ java - com.google.cloud.spanner.connection.ConnectionPropertiesFileGenerator + com.google.cloud.spanner.jdbc.ConnectionPropertiesFileGenerator test false diff --git a/src/main/java/com/google/cloud/spanner/connection/ConnectionPropertiesHelper.java b/src/main/java/com/google/cloud/spanner/jdbc/ConnectionPropertiesHelper.java similarity index 80% rename from src/main/java/com/google/cloud/spanner/connection/ConnectionPropertiesHelper.java rename to src/main/java/com/google/cloud/spanner/jdbc/ConnectionPropertiesHelper.java index cde651e02..4f8db86b0 100644 --- a/src/main/java/com/google/cloud/spanner/connection/ConnectionPropertiesHelper.java +++ b/src/main/java/com/google/cloud/spanner/jdbc/ConnectionPropertiesHelper.java @@ -14,9 +14,10 @@ * limitations under the License. */ -package com.google.cloud.spanner.connection; +package com.google.cloud.spanner.jdbc; -import com.google.api.core.InternalApi; +import com.google.cloud.spanner.connection.ConnectionProperties; +import com.google.cloud.spanner.connection.ConnectionProperty; import com.google.common.collect.ImmutableList; import java.sql.DriverPropertyInfo; import java.util.Arrays; @@ -26,16 +27,14 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -// TODO: Remove this class when the Connection API has made the list of properties public. -@InternalApi -public class ConnectionPropertiesHelper { - public static ImmutableList> VALID_CONNECTION_PROPERTIES = +class ConnectionPropertiesHelper { + static ImmutableList> VALID_CONNECTION_PROPERTIES = ImmutableList.copyOf( - ConnectionProperties.CONNECTION_PROPERTIES.values().stream() + ConnectionProperties.VALID_CONNECTION_PROPERTIES.stream() .sorted(Comparator.comparing(ConnectionProperty::getName)) .collect(Collectors.toList())); - public static DriverPropertyInfo toDriverPropertyInfo( + static DriverPropertyInfo toDriverPropertyInfo( String connectionUri, ConnectionProperty connectionProperty) { DriverPropertyInfo result = new DriverPropertyInfo( @@ -56,7 +55,7 @@ public static DriverPropertyInfo toDriverPropertyInfo( return result; } - public static String getConnectionPropertyName(ConnectionProperty connectionProperty) { + static String getConnectionPropertyName(ConnectionProperty connectionProperty) { return connectionProperty.getName(); } diff --git a/src/main/java/com/google/cloud/spanner/jdbc/JdbcDriver.java b/src/main/java/com/google/cloud/spanner/jdbc/JdbcDriver.java index 838d3e4c0..120880fee 100644 --- a/src/main/java/com/google/cloud/spanner/jdbc/JdbcDriver.java +++ b/src/main/java/com/google/cloud/spanner/jdbc/JdbcDriver.java @@ -23,7 +23,6 @@ import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.connection.ConnectionOptions; import com.google.cloud.spanner.connection.ConnectionOptionsHelper; -import com.google.cloud.spanner.connection.ConnectionPropertiesHelper; import com.google.cloud.spanner.connection.ConnectionProperty; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Suppliers; diff --git a/src/test/java/com/google/cloud/spanner/connection/ConnectionPropertiesFileGenerator.java b/src/test/java/com/google/cloud/spanner/jdbc/ConnectionPropertiesFileGenerator.java similarity index 96% rename from src/test/java/com/google/cloud/spanner/connection/ConnectionPropertiesFileGenerator.java rename to src/test/java/com/google/cloud/spanner/jdbc/ConnectionPropertiesFileGenerator.java index 4307fbcb0..9efc63b9e 100644 --- a/src/test/java/com/google/cloud/spanner/connection/ConnectionPropertiesFileGenerator.java +++ b/src/test/java/com/google/cloud/spanner/jdbc/ConnectionPropertiesFileGenerator.java @@ -14,8 +14,9 @@ * limitations under the License. */ -package com.google.cloud.spanner.connection; +package com.google.cloud.spanner.jdbc; +import com.google.cloud.spanner.connection.ConnectionProperty; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcDriverTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcDriverTest.java index 494233faf..9ae33fa6f 100644 --- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcDriverTest.java +++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcDriverTest.java @@ -26,7 +26,6 @@ import com.google.cloud.ServiceOptions; import com.google.cloud.spanner.MockSpannerServiceImpl; -import com.google.cloud.spanner.connection.ConnectionPropertiesHelper; import com.google.cloud.spanner.connection.SpannerPool; import com.google.common.collect.Collections2; import com.google.common.collect.ImmutableList;