diff --git a/src/main/java/com/atlassian/db/replica/api/DualConnection.java b/src/main/java/com/atlassian/db/replica/api/DualConnection.java index d64709b..1daf68d 100644 --- a/src/main/java/com/atlassian/db/replica/api/DualConnection.java +++ b/src/main/java/com/atlassian/db/replica/api/DualConnection.java @@ -182,11 +182,7 @@ public boolean isClosed() { @Override public DatabaseMetaData getMetaData() throws SQLException { checkClosed(); - if (compatibleWithPreviousVersion) { - return connectionProvider.getWriteConnection(new RouteDecisionBuilder(Reason.RW_API_CALL)).getMetaData(); - } else { - return connectionProvider.getReadConnection(new RouteDecisionBuilder(Reason.RO_API_CALL)).getMetaData(); - } + return connectionProvider.getReadConnection(new RouteDecisionBuilder(Reason.RO_API_CALL)).getMetaData(); } @Override @@ -545,29 +541,17 @@ public void setClientInfo(Properties properties) throws SQLClientInfoException { @Override public String getClientInfo(String name) throws SQLException { checkClosed(); - if (compatibleWithPreviousVersion) { - return connectionProvider - .getWriteConnection(new RouteDecisionBuilder(Reason.RW_API_CALL)) - .getClientInfo(name); - } else { - return connectionProvider - .getReadConnection(new RouteDecisionBuilder(Reason.RO_API_CALL)) - .getClientInfo(name); - } + return connectionProvider + .getReadConnection(new RouteDecisionBuilder(Reason.RO_API_CALL)) + .getClientInfo(name); } @Override public Properties getClientInfo() throws SQLException { checkClosed(); - if (compatibleWithPreviousVersion) { - return connectionProvider - .getWriteConnection(new RouteDecisionBuilder(Reason.RW_API_CALL)) - .getClientInfo(); - } else { - return connectionProvider - .getReadConnection(new RouteDecisionBuilder(Reason.RO_API_CALL)) - .getClientInfo(); - } + return connectionProvider + .getReadConnection(new RouteDecisionBuilder(Reason.RO_API_CALL)) + .getClientInfo(); } @Override