Skip to content

Commit

Permalink
minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
net-cscience-raphael committed Dec 3, 2024
1 parent 0dfa5f0 commit 77f2ed9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ enum class ComparisonOperator(val value: String) {
* @param str The [String] which should be one of the [ComparisonOperator]
* @throws IllegalArgumentException In case the given string is not one of the defined ones.
*/
fun fromString(str: String): ComparisonOperator {
infix fun fromString(str: String): ComparisonOperator {
return when (str.trim()) {
EQ.value -> EQ
NEQ.value -> NEQ
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class LateFilter(
/* appends late filter */
val limit: Int = Int.MAX_VALUE,
/* on missing key skip */
val skip: Skip = Skip.valueOf("ignore"),
val skip: Skip = Skip fromString "warn",

override val name: String
) : Transformer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ class LateFilterFactory() : TransformerFactory {
} else {
emptyList()
}
return LateFilter(input, field, keys, ComparisonOperator.fromString(comparison), value, limit, Skip.fromString(skip), name)
return LateFilter(input, field, keys, ComparisonOperator fromString comparison, value, limit, Skip fromString skip, name)
}
}

0 comments on commit 77f2ed9

Please sign in to comment.