Skip to content

Small refactorings#6476

Open
line-o wants to merge 8 commits into
eXist-db:developfrom
line-o:small-refactor
Open

Small refactorings#6476
line-o wants to merge 8 commits into
eXist-db:developfrom
line-o:small-refactor

Conversation

@line-o

@line-o line-o commented Jun 14, 2026

Copy link
Copy Markdown
Member

One test kept failing on my local machine with a fixed port (could not bind to 8088)
I switched it to using a random port instead. Please review this with care as well.

Add a new helper function to FunctionFactory to keep logic from to two call sites in one place:

  • ArrowOperator
  • XqueryTree.g

Reformat and refactor for readability and maintainability

  • FunctionFactory

Smaller refactorings for readability and maintainability in

  • ArrowOperator
  • XqueryContext

line-o added 6 commits June 15, 2026 00:19
Without this change the test suite
reproducibly failed with cannot bind to 0.0.0.0:8088
Return early and  use new switch-statement
in order to simplify the flow within FunctionFactory.createFunction
Introduce new private method functionNotFoundErrorDescription in order to make
resolveForwardRefences easier to understand.
* Return early in order to reduce indentation.
* Fix comments
* Fix formatting
Two separate instances of the same code that ran after FunctionFactory.createFunction
indicated that it might be better to have both pieces run the same code to counter drift.
The new method FunctionFactory.createFunctionCall ensures that the RHS of ArrowOperator is treated as other functionCalls in XQuery.
line-o added 2 commits June 15, 2026 10:40
The four string operation optimization functions
startsWith, endsWith, contains and equals where doing almost the same thing.
They are now generalized into optimizeStringFunction.
@line-o line-o marked this pull request as ready for review June 15, 2026 08:48
@line-o line-o requested a review from a team as a code owner June 15, 2026 08:48
@duncdrum duncdrum requested a review from a team June 15, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants