Skip to content

Commit

Permalink
Remove lift(..) call from Pattern.conpile
Browse files Browse the repository at this point in the history
  • Loading branch information
danslapman committed Jan 18, 2025
1 parent cfe8970 commit 061adfe
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ final class AdminApiHandler(
val queryPart = queryString.map(qs =>
query[HttpStub](hs =>
hs.id == lift(qs) ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(hs.name).matches() ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(hs.path.!!).matches() ||
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(hs.name).matches() ||
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(hs.path.!!).matches() ||
unchecked(BsonDocument("pathPattern" -> BsonDocument("$regex" -> qs, "$options" -> "i")))
)
)
Expand Down Expand Up @@ -274,9 +274,9 @@ final class AdminApiHandler(
val queryPart = queryString.map(qs =>
query[Scenario](s =>
s.id == lift(qs) ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(s.name).matches() ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(s.source).matches() ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(s.destination.!!).matches()
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(s.name).matches() ||
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(s.source).matches() ||
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(s.destination.!!).matches()
)
)

Expand Down Expand Up @@ -440,7 +440,7 @@ final class AdminApiHandler(
.foreach(queryString) { qs =>
grpcMethodDescriptionDAO.findChunk(
query[GrpcMethodDescription](gmd =>
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(gmd.methodName).matches()
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(gmd.methodName).matches()
),
0,
Integer.MAX_VALUE
Expand All @@ -460,7 +460,7 @@ final class AdminApiHandler(
val queryPart = queryString.map(qs =>
query[GrpcStub](gs =>
gs.id == lift(qs) ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(gs.name).matches() ||
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(gs.name).matches() ||
lift(nameDescriptions.map(_.id)).contains(gs.methodDescriptionId)
)
)
Expand Down Expand Up @@ -790,7 +790,7 @@ final class AdminApiHandler(
val queryPart = queryString.map(qs =>
query[GrpcStub](gs =>
gs.id == lift(qs) ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(gs.name).matches() ||
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(gs.name).matches() ||
gs.methodDescriptionId == lift(qs)
)
)
Expand Down Expand Up @@ -922,7 +922,7 @@ final class AdminApiHandler(
val queryPart = queryString.map(qs =>
query[GrpcMethodDescription](gs =>
gs.id == lift(qs) ||
Pattern.compile(lift(qs), Pattern.CASE_INSENSITIVE).matcher(gs.service).matches()
Pattern.compile(qs, Pattern.CASE_INSENSITIVE).matcher(gs.service).matches()
)
)

Expand Down

0 comments on commit 061adfe

Please sign in to comment.