Skip to content

Fix#9497 Replace deprecated Result.getResult() calls with isResult() - #9498

Open
leehaut wants to merge 2 commits into
apache:mainfrom
leehaut:hotfix/lance-common-67
Open

leehaut wants to merge 2 commits into
apache:mainfrom
leehaut:hotfix/lance-common-67

Conversation

@leehaut

@leehaut leehaut commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Fix #9497

Summary

org.apache.hop.core.Result.getResult() has been deprecated since 2.16 in favor of isResult(). Both methods read the same success flag, so this change does not alter execution behavior.

  • Call sites whose receiver is org.apache.hop.core.Result now use isResult(). This covers production code (LineageRunLifecycleEmitter, LoadBalancingWorkflowEngine, CypherScript, WorkflowReplayGateAfterActionXp) and the action tests that assert on execute(...).
  • Result.getResult() stays, marked @Deprecated(since = "2.16"), and delegates to isResult() so external plugins keep compiling. It has to be a real method: with getResult() present, Lombok treats it as the getter for boolean result and does not generate isResult().
  • Plain accessors that duplicated @Getter / @Setter are removed: getRows(), and the get/set pair for bytes read and written by the current action. setRows() stays, because a null argument is stored as an empty list.
  • ResultTest covers the default flag, setResult, agreement between isResult() and the deprecated getResult(), clone / lightClone, the XML round trip, and the "result" JSON property.

Methods named getResult() that return a Result object are unchanged. That includes Workflow.getResult(), Pipeline.getResult(), ActionResult.getResult(), and WebResult.getResult().

Test plan

  • ./mvnw -pl core test -Dtest=ResultTest
  • Run a touched action test module, for example plugins/actions/http or plugins/misc/mail, and confirm success and failure assertions still match the action outcome
  • Compile the touched modules and confirm there is no deprecation warning for org.apache.hop.core.Result.getResult() at the updated call sites

@hansva

hansva commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Thanks for this cleanup. The code changes look good to me. Three things before we merge:

1. The documentation still uses getResult()

  • docs/hop-user-manual/modules/ROOT/pages/workflow/actions/eval.adoc (line 127) tells JavaScript users to call previous_result.getResult(). Scripts written from that page will fail at runtime once the deprecated method is removed, so this one matters most. Please change it to previous_result.isResult().
  • docs/hop-dev-manual/modules/ROOT/pages/sdk/workflows.adoc uses result.getResult() on lines 107, 114 and 151. This is the code plugin developers copy, so it should show isResult() too.

2. The @deprecated tag on getResult() lost its link

In Result.java the tag changed from {@link #isResult()} to plain isResult(). Without the link, IDEs can't jump to the replacement and Javadoc no longer checks that the method exists. Please keep {@link #isResult()}.

3. Explain why isResult() is written out

The class has @Getter, so the explicit isResult() looks redundant, but it isn't. Lombok skips the getter for the boolean result because getResult() already exists. If someone later deletes isResult() as boilerplate, every call site migrated in this PR stops compiling. A one-line comment above isResult() would prevent that, for example:

// Written out: Lombok does not generate isResult() while the deprecated getResult() exists.

@leehaut

leehaut commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @hansva . All three points are addressed:

  1. eval.adoc and workflows.adoc now use isResult().
  2. The @deprecated tag on getResult() is {@link #isResult()} again.
  3. isResult() has a comment explaining why it is written out: Lombok does not generate it while the deprecated getResult() exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Replace deprecated Result.getResult() call sites with isResult()

2 participants