Updated libraries to able compile to java 8

This commit is contained in:
Andrew Golovashevich 2025-03-26 02:22:47 +03:00
parent d21842bee6
commit abd011ef82
2 changed files with 6 additions and 7 deletions

View File

@ -31,14 +31,15 @@ xomrk {
jvm {
withJava()
/*compilations.configureEach {
compilations.configureEach {
compileJavaTaskProvider?.configure {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
compileTaskProvider.configure {
compilerOptions { jvmTarget = JvmTarget.JVM_1_8 }
}
}*/
}
}
sourceSets {
@ -47,8 +48,8 @@ xomrk {
compileOnly("org.jetbrains:annotations:26.0.2")
compileOnly("com.intellij:annotations:9.0.4")
implementation("it.unimi.dsi:fastutil:6.3")
implementation("ru.landgrafhomyak.utility:highlevel-try-finally:0.4")
implementation("ru.landgrafhomyak.utility:reference-counter:0.1")
implementation("ru.landgrafhomyak.utility:highlevel-try-finally:0.5")
implementation("ru.landgrafhomyak.utility:reference-counter:0.2")
}
}
}

View File

@ -31,18 +31,16 @@ internal abstract class PreparedStatementWrapper(@JvmField protected val _orig:
private val _refcnt = CloseableReferenceCounter("This prepared statement was returned to pool to be used in future")
private var _currentQuery: ResultSetWrapper? = null
private var _closeOnCompletion: Boolean = false
private var _isClosed = false
@Throws(SQLException::class)
protected abstract fun _onClose()
override fun close() {
this._refcnt.close("Can't close prepared statement while it's in use")
this._isClosed = true
this._onClose()
}
override fun isClosed(): Boolean = this._isClosed
override fun isClosed(): Boolean = this._refcnt.isClosed
override fun closeOnCompletion() =
this._refcnt.withRef { this._closeOnCompletion = true }