Skip to content

Commit a7eeb09

Browse files
committed
Enable reporting of Lambda parameter renames
spring-projects/spring-boot@558d811 Rename Variable zipEntry : null to jarEntry : null in method private extractLibraries(fileResolver FileResolver, jarStructure JarStructure, options Map<Option,String>) : void from class org.springframework.boot.jarmode.tools.ExtractCommand Rename Variable zipEntry : null to jarEntry : null in method private extractArchive(fileResolver FileResolver, entryNameTransformer EntryNameTransformer) : void from class org.springframework.boot.jarmode.tools.ExtractCommand Rename Variable zipEntry : null to jarEntry : null in method private createApplication(jarStructure JarStructure, fileResolver FileResolver, options Map<Option,String>) : void from class org.springframework.boot.jarmode.tools.ExtractCommand
1 parent 165fcb6 commit a7eeb09

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/gr/uom/java/xmi/decomposition/AbstractStatement.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.List;
44

5+
import gr.uom.java.xmi.VariableDeclarationContainer;
6+
57
public abstract class AbstractStatement extends AbstractCodeFragment {
68
private CompositeStatementObject parent;
79
protected String actualSignature;
@@ -30,6 +32,18 @@ public VariableDeclaration searchVariableDeclaration(String variableName) {
3032
else if(parent != null) {
3133
return parent.searchVariableDeclaration(variableName);
3234
}
35+
else if(this instanceof CompositeStatementObject) {
36+
CompositeStatementObject comp = (CompositeStatementObject)this;
37+
if(comp.getOwner().isPresent()) {
38+
VariableDeclarationContainer container = comp.getOwner().get();
39+
if(container instanceof LambdaExpressionObject) {
40+
VariableDeclaration declaration = container.getVariableDeclaration(variableName);
41+
if(declaration != null) {
42+
return declaration;
43+
}
44+
}
45+
}
46+
}
3347
return null;
3448
}
3549

0 commit comments

Comments
 (0)