From a64bba34684ccd0654e9cccae9b19856327d97ad Mon Sep 17 00:00:00 2001 From: stephen-hero <78870893+stephen-hero@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:35:57 +0200 Subject: [PATCH] Update task.md language checked --- InliningCode/MiddleManCodeSmell/Theory/task.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InliningCode/MiddleManCodeSmell/Theory/task.md b/InliningCode/MiddleManCodeSmell/Theory/task.md index 75df765..24db165 100644 --- a/InliningCode/MiddleManCodeSmell/Theory/task.md +++ b/InliningCode/MiddleManCodeSmell/Theory/task.md @@ -3,12 +3,12 @@ forwarding calls to another class or method **without adding any meaningful beha Essentially, the Middle Man does not provide any additional value and merely adds unnecessary abstraction, making the code more complex and harder to understand. -The Inline Method refactoring can help to resolve the Middle Man code smell **by removing the unnecessary methods and +The Inline Method refactoring can help to resolve the Middle Man code smell **by removing unnecessary methods and directly calling the target methods** from the client classes. By inlining the methods, you eliminate the Middle Man -and reduce the abstraction, leading to cleaner and more straightforward code. +and reduce abstraction, leading to cleaner and more straightforward code. The **Main.java** file contains an example of the Middle Man code smell. -In this example, the `MiddleMan` class acts as an intermediary by forwarding the call to `DataProvider` to fetch data. +In this example, the `MiddleMan` class acts as an intermediary, forwarding the call to `DataProvider` to fetch data. However, the `MiddleMan` class does not add any meaningful behavior or value of its own and only complicates the code. This is a typical example of the Middle Man code smell.