This repository has been archived by the owner on May 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved: Refactor ContentWorkerInterface methods signatures
(OFBIZ-9164) While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue due to r1652852 where Adrian improved the cacheKey in FormFactory.getFormFromLocation() by adding a delegator reference (Tenants). Actually I'm not even sure it was done at r1652852 because Adrian did not maintain the FormFactory svn history. Anyway, to make a long story short I had to introduce a DispatchContext parameter when calling FormFactory.readFormDocument() when the code from R13.07 only passed a null. This had an impact in the hierarchy tree because FormFactory.readFormDocument() was called in DataResourceWorker class, where the new code was called from renderDataResourceAsText(). So I instead of only passing a Delegator I decided to pass only a LocalDispatcher parameter in renderDataResourceAsText(), since we can get the Delegator from the LocalDispatcher. Doing so it had an impact on the renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface and all related. I finally decided to apply the same "Change Method Signature" refactoring pattern (http://refactoring.com/catalog/addParameter.html) to all cases related to ContentWorkerInterface. No need to pass a delegator when you have LocalDispatcher! Since last commit and revert I fixed 5 test failures and improved the code more, mostly formatting, comments, etc. There are very ugly method signatures out there which still need refactoring, but it's so much work... git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777297 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
1 parent
8df17d7
commit 13f998c
Showing
40 changed files
with
183 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.