HomePhorge

Make the default behavior of getApplicationTransactionCommentObject() "return…

Description

Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw"

Summary:
Depends on D20115. See https://discourse.phabricator-community.org/t/transaction-search-endpoint-does-not-work-on-differential-diffs/2369/.

Currently, getApplicationTransactionCommentObject() throws by default. Subclasses must override it to return null to indicate that they don't support comments.

This is silly, and leads to a bunch of code that does a try / catch around it, and at least some code (here, transaction.search) which doesn't try / catch and gets the wrong behavior as a result.

Just make it return null by default, meaning "no support for comments". Then remove the try / catch stuff and all the return null implementations.

Test Plan:

  • Grepped for getApplicationTransactionCommentObject(), fixed each callsite / definition.
  • Called transaction.search on a diff with transactions (i.e., not a sourced-from-commit diff).

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: jbrownEP

Differential Revision: https://secure.phabricator.com/D20121

Details

Provenance
epriestleyAuthored on Feb 6 2019, 7:36 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP4fa5a2421ea5: Add formal setup guidance warning that "feed.http-hooks" will be removed in a…
Branches
Loading...
Tags
Loading...

Event Timeline