Fix remaining warnings in jdbc and drop jdk exemptions

Original commit: elastic/x-pack-elasticsearch@aff8a7fe42
This commit is contained in:
Nik Everett 2017-06-29 12:16:50 -04:00
parent acfc8d1bc5
commit e5df9a0269
5 changed files with 1 additions and 27 deletions

View File

@ -9,23 +9,6 @@ subprojects {
sourceSets.test.resources.srcDirs = ["src/test/resources", "src/test/java"]
// Massaging Eclipse
eclipse {
classpath.file {
whenMerged { cp ->
def con = entries.find { e ->
e.kind == "con" && e.toString().contains("org.eclipse.jdt.launching.JRE_CONTAINER")
}
((AbstractClasspathEntry) con).accessRules.add(new AccessRule("accessible", "com/sun/net/httpserver/*"))
entries.unique { a, b ->
return a.path.compareTo(b.path)
}
entries.removeAll { it.path.endsWith('.pom') }
}
}
}
dependencies {
testCompile "org.elasticsearch.test:framework:${version}"
}

View File

@ -10,6 +10,7 @@ import org.elasticsearch.xpack.sql.cli.net.protocol.Response;
import org.elasticsearch.xpack.sql.test.server.ProtoHttpServer;
public class CliHttpServer extends ProtoHttpServer<Response> {
// NOCOMMIT replace me with the same hack that JdbcIntegrationTestCase uses
public CliHttpServer(Client client) {
super(client, new CliProtoHandler(client), "/cli/", "sql/");

View File

@ -57,12 +57,6 @@ dependencyLicenses {
ignoreSha 'net-client'
}
forbiddenApisTest {
//we are using jdk-internal instead of jdk-non-portable to allow for com.sun.net.httpserver.* usage
bundledSignatures -= 'jdk-non-portable'
bundledSignatures += 'jdk-internal'
}
// TODO seems like we should use the jars....
jar {
from(zipTree(project(':x-pack-elasticsearch:sql-clients:net-client').jar.archivePath))

View File

@ -30,13 +30,10 @@ import java.sql.Types;
import java.util.Calendar;
class JdbcPreparedStatement extends JdbcStatement implements PreparedStatement {
private final String sql;
final PreparedQuery query;
JdbcPreparedStatement(JdbcConnection con, String sql) {
super(con);
this.sql = sql;
this.query = PreparedQuery.prepare(sql);
}

View File

@ -33,7 +33,6 @@ import static java.sql.Types.REAL;
import static java.sql.Types.SMALLINT;
import static java.sql.Types.TIME;
import static java.sql.Types.TIMESTAMP;
import static java.sql.Types.TIMESTAMP_WITH_TIMEZONE;
import static java.sql.Types.TINYINT;
import static java.sql.Types.VARBINARY;
import static java.sql.Types.VARCHAR;