mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-31 22:04:23 +01:00
Merge 'Change bindings/java to support java 8' from Kim Seon Woo
## Purpose of this PR Change java bindings support from jdk version 17 to 8. ## Changes - Mostly related to dependency version updates - Replace java 8 non supported methods ## Reference https://github.com/tursodatabase/limbo/issues/615 Closes #678
This commit is contained in:
2
.github/workflows/java.yml
vendored
2
.github/workflows/java.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
java-version: '8'
|
||||
|
||||
- name: Run Java tests
|
||||
run: make test
|
||||
|
||||
@@ -4,15 +4,15 @@ import net.ltgt.gradle.errorprone.errorprone
|
||||
plugins {
|
||||
java
|
||||
application
|
||||
id("net.ltgt.errorprone") version "4.1.0"
|
||||
id("net.ltgt.errorprone") version "3.1.0"
|
||||
}
|
||||
|
||||
group = "org.github.tursodatabase"
|
||||
version = "0.0.1-SNAPSHOT"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -20,8 +20,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
errorprone("com.uber.nullaway:nullaway:0.12.3")
|
||||
errorprone("com.google.errorprone:error_prone_core:2.36.0")
|
||||
errorprone("com.uber.nullaway:nullaway:0.10.26") // maximum version which supports java 8
|
||||
errorprone("com.google.errorprone:error_prone_core:2.10.0") // maximum version which supports java 8
|
||||
|
||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
|
||||
@@ -46,7 +46,7 @@ public abstract class LimboConnection implements Connection {
|
||||
}
|
||||
|
||||
private static AbstractDB open(String url, String fileName, Properties properties) throws SQLException {
|
||||
if (fileName.isBlank()) {
|
||||
if (fileName.isEmpty()) {
|
||||
throw new IllegalArgumentException("fileName should not be empty");
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.github.tursodatabase.LimboConnection;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -150,7 +151,7 @@ public class JDBC4Connection extends LimboConnection {
|
||||
@Override
|
||||
public Map<String, Class<?>> getTypeMap() throws SQLException {
|
||||
// TODO
|
||||
return Map.of();
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user