Page MenuHomePhorge

Remove unused methods in PhabricatorEditorExtension
ClosedPublic

Authored by aklapper on May 16 2024, 10:07.

Details

Summary

The methods newRequiredTransasctionError() [sic!] and newInvalidTransactionError() are not called anywhere in the codebase. Both are final protected, thus remove them.

Incidentally, speedup Diviner generation by at least 0.000000000000000000000001 milliseconds.

Test Plan

Grep the code.

Diff Detail

Repository
rP Phorge
Branch
NEeditorExtensionNewError (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1410
Build 1410: arc lint + arc unit

Event Timeline

Also fix the typo in the function name

this function does not seem to get called anywhere anyway

Since 2019, this method is whispering "master... please... kill me..."

So, please respect their wish, and kill it with maximum violence.

kill it

This stuff was introduced in rPf7e8fa0764fe7bd2546442cccbb6ec447b0ea8e2 so I initially thought the consumers were meant to be potential external editor code but I might be wrong because they are final protected. Indeed newRequiredTransactionError and newInvalidTransactionError are not called anywhere within Phorge itself, so if you confirm I am fine with removing both.

@valerio.bozzolan Any thoughts/opinion regarding my last comment? :) TIA

Feel free to kill this method violently 🗡 since as you said this is protected (no external usages) + final (no overrides) and visibly broken since 5 years

(Fun fact, to type the dagger emojii I tiped :D since I always type :D obtaining a dagger by mistake. Now it's a feature. asd - T15285)

Remove unused final protected methods in PhabricatorEditorExtension

aklapper retitled this revision from Fix call to non-existing newError() in PhabricatorEditorExtension to Remove unused final protected methods in PhabricatorEditorExtension.Jul 2 2024, 12:42
aklapper edited the summary of this revision. (Show Details)
aklapper edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Jul 2 2024, 14:07
aklapper retitled this revision from Remove unused final protected methods in PhabricatorEditorExtension to Remove unused methods in PhabricatorEditorExtension.Jul 2 2024, 15:54