Skip to content

Commit 1254518

Browse files
committed
cleanup
1 parent 933420a commit 1254518

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

jcdb-core/src/main/kotlin/org/utbot/jcdb/impl/storage/SQLitePersistenceImpl.kt

+4-5
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ class SQLitePersistenceImpl(
3838
) : JCDBPersistence, Closeable {
3939

4040
companion object : KLogging() {
41+
private const val cachesPrefix = "org.utbot.jcdb.persistence.caches"
4142

42-
private val locationsCacheSize =
43-
Integer.getInteger("org.utbot.jcdb.persistence.caches.locations", 1_000).toLong()
44-
private val byteCodeCacheSize =
45-
Integer.getInteger("org.utbot.jcdb.persistence.caches.bytecode", 10_000).toLong()
46-
private val symbolsCacheSize = Integer.getInteger("org.utbot.jcdb.persistence.caches.symbols", 100_000).toLong()
43+
private val locationsCacheSize = Integer.getInteger("$cachesPrefix.locations", 1_000).toLong()
44+
private val byteCodeCacheSize = Integer.getInteger("$cachesPrefix.bytecode", 10_000).toLong()
45+
private val symbolsCacheSize = Integer.getInteger("$cachesPrefix.symbols", 100_000).toLong()
4746
}
4847

4948
private val lock = ReentrantLock()

jcdb-testing/src/main/kotlin/org/utbot/jcdb/impl/tests/DatabaseEnvTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ abstract class DatabaseEnvTest {
125125
assertEquals("byte[]", type.typeName)
126126
}
127127

128-
with(fields.get(1)) {
128+
with(fields[1]) {
129129
assertEquals("objectArray", name)
130130
assertEquals("java.lang.Object[]", type.typeName)
131131
}
132132

133-
with(fields.get(2)) {
133+
with(fields[2]) {
134134
assertEquals("objectObjectArray", name)
135135
assertEquals("java.lang.Object[][]", type.typeName)
136136
}

0 commit comments

Comments
 (0)