Skip to content

Missing Inline Method instance #25

@osmarleandro

Description

@osmarleandro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions