Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Inline Method instance #25

Open
osmarleandro opened this issue Feb 11, 2021 · 0 comments
Open

Missing Inline Method instance #25

osmarleandro opened this issue Feb 11, 2021 · 0 comments

Comments

@osmarleandro
Copy link

Summary

In the source code present in osmarleandro/spring-boot@9576873 commit, I applied a single Inline Method to applyAdvisors() method in DiscoveredOperationsFactory class, and RefDiff does not detect it.

Code example

Diff fragment between the commit osmarleandro/spring-boot@9576873 and their parent.

@@ -89,19 +89,15 @@ abstract class DiscoveredOperationsFactory<O extends Operation> {
                DiscoveredOperationMethod operationMethod = new DiscoveredOperationMethod(method, operationType,
                                annotation.asAnnotationAttributes());
                OperationInvoker invoker = new ReflectiveOperationInvoker(target, operationMethod, this.parameterValueMapper);
-               invoker = applyAdvisors(endpointId, operationMethod, invoker);
-               return createOperation(endpointId, operationMethod, invoker);
-       }
-
-       private OperationInvoker applyAdvisors(EndpointId endpointId, OperationMethod operationMethod,
-                       OperationInvoker invoker) {
+               OperationInvoker invoker1 = invoker;
                if (this.invokerAdvisors != null) {
                        for (OperationInvokerAdvisor advisor : this.invokerAdvisors) {
-                               invoker = advisor.apply(endpointId, operationMethod.getOperationType(), operationMethod.getParameters(),
-                                               invoker);
+                               invoker1 = advisor.apply(endpointId, operationMethod.getOperationType(), operationMethod.getParameters(),
+                                               invoker1);
                        }
                }
-               return invoker;
+               invoker = invoker1;
+               return createOperation(endpointId, operationMethod, invoker);
        }

Environment details

RefDiff 2.0

Steps to reproduce

  1. Run RefDiff and give as input the commit osmarleandro/spring-boot@9576873.

Actual results

RefDiff yields an empty set of refactorings.

Expected results

A single instance of the Inline Method refactoring applied to applyAdvisors() method in DiscoveredOperationsFactory class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant