Skip to content

Commit

Permalink
[CALCITE-591] Drop support for Java 1.6 (and JDBC 4.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhyde committed Feb 13, 2015
1 parent 9ffba4a commit 7b65eeb
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 73 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk6
branches:
only:
- master
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ protected Handler createHandler() {
protected String getFactoryClassName(JdbcVersion jdbcVersion) {
switch (jdbcVersion) {
case JDBC_30:
return "org.apache.calcite.avatica.AvaticaFactoryJdbc3Impl";
case JDBC_40:
return "org.apache.calcite.avatica.AvaticaJdbc40Factory";
throw new IllegalArgumentException("JDBC version not supported: "
+ jdbcVersion);
case JDBC_41:
default:
return "org.apache.calcite.avatica.AvaticaJdbc41Factory";
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions core/src/main/java/org/apache/calcite/jdbc/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ protected Function0<CalcitePrepare> createPrepareFactory() {
@Override protected String getFactoryClassName(JdbcVersion jdbcVersion) {
switch (jdbcVersion) {
case JDBC_30:
return "org.apache.calcite.jdbc.CalciteJdbc3Factory";
case JDBC_40:
return "org.apache.calcite.jdbc.CalciteJdbc40Factory";
throw new IllegalArgumentException("JDBC version not supported: "
+ jdbcVersion);
case JDBC_41:
default:
return "org.apache.calcite.jdbc.CalciteJdbc41Factory";
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/org/apache/calcite/util/Compatible.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public interface Compatible {
*
* <p>This method is available in JDK 1.7 and above, and in
* {@link org.apache.calcite.jdbc.CalciteConnection} in all JDK versions. */
@Deprecated // to be removed before 2.0
void setSchema(Connection connection, String schema);

/** Creates the implementation of Compatible suitable for the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.apache.calcite.schema.SchemaPlus;
import org.apache.calcite.schema.impl.AbstractSchema;
import org.apache.calcite.schema.impl.ViewTable;
import org.apache.calcite.util.Compatible;
import org.apache.calcite.util.JsonBuilder;
import org.apache.calcite.util.Pair;
import org.apache.calcite.util.Util;
Expand Down Expand Up @@ -972,7 +971,7 @@ public Connection apply(Connection connection) throws SQLException {
SchemaPlus rootSchema = con.getRootSchema();
rootSchema.add(name, schema);
}
Compatible.INSTANCE.setSchema(connection, name);
connection.setSchema(name);
return connection;
}
}
Expand Down
8 changes: 4 additions & 4 deletions doc/HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ adapters.
## Building from a source distribution

Prerequisites are maven (3.2.1 or later)
and Java (JDK 1.6 or later, 1.8 preferred) on your path.
and Java (JDK 1.7 or later, 1.8 preferred) on your path.

Unpack the source distribution `.tar.gz` or `.zip` file,
`cd` to the root directory of the unpacked source,
Expand All @@ -24,7 +24,7 @@ tests.
## Building from git

Prerequisites are git, maven (3.2.1 or later)
and Java (JDK 1.6 or later, 1.8 preferred) on your path.
and Java (JDK 1.7 or later, 1.8 preferred) on your path.

Create a local copy of the github repository,
`cd` to its root directory,
Expand Down Expand Up @@ -283,7 +283,7 @@ the `KEYS` file.
Before you start:
* Set up signing keys as described above.
* Make sure you are using JDK 1.7 (not 1.6 or 1.8).
* Make sure you are using JDK 1.7 (not 1.8).
* Make sure build and tests succeed with `-Dcalcite.test.db=hsqldb` (the default)
```bash
Expand All @@ -303,7 +303,7 @@ When the dry-run has succeeded, change `install` to `deploy`.
Before you start:
* Set up signing keys as described above.
* Make sure you are using JDK 1.7 (not 1.6 or 1.8).
* Make sure you are using JDK 1.7 (not 1.8).
* Check that `README`, `README.md` and `HOWTO.md` have the correct version number.
* Make sure build and tests succeed, including with
-Dcalcite.test.db={mysql,hsqldb}, -Dcalcite.test.slow=true,
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ limitations under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 7b65eeb

Please sign in to comment.