RefDiff icon indicating copy to clipboard operation
RefDiff copied to clipboard

Missing Inline Method instance

Open osmarleandro opened this issue 4 years ago • 0 comments

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.

osmarleandro avatar Feb 11 '21 01:02 osmarleandro