Remove Clonable to fix StackOverflow

Potential fix for stackoverflow issue with Clonable.
pull/1584/head
Trevor Terris 3 years ago
parent adacf99290
commit d9f414a27c

@ -2,7 +2,7 @@ package com.todoroo.andlib.sql
import java.util.*
abstract class DBObject internal constructor(val expression: String) : Cloneable {
abstract class DBObject internal constructor(val expression: String) {
var alias: String? = null
abstract fun `as`(newAlias: String): DBObject

@ -8,13 +8,9 @@ open class Field(expression: String) : DBObject(expression) {
}
override fun `as`(newAlias: String): Field {
return try {
val clone = clone() as Field
val clone = Field(expression)
clone.alias = newAlias
clone
} catch (e: CloneNotSupportedException) {
throw RuntimeException(e)
}
return clone
}
fun gt(value: Any?): Criterion = UnaryCriterion.gt(this, value)

Loading…
Cancel
Save