Skip to content

Commit

Permalink
Improvement over previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Dec 24, 2024
1 parent aee92cb commit 1fe5c30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main/java/gr/uom/java/xmi/UMLAttribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import gr.uom.java.xmi.diff.CodeRange;
import gr.uom.java.xmi.diff.StringDistance;

import static gr.uom.java.xmi.Constants.JAVA;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -225,7 +227,9 @@ public List<AbstractCall> getAllOperationInvocations() {
if(initializer != null) {
List<AbstractCall> list = new ArrayList<>(initializer.getMethodInvocations());
for(LambdaExpressionObject lambda : initializer.getLambdas()) {
list.addAll(lambda.getAllOperationInvocations());
if(lambda.getString().contains(JAVA.LAMBDA_ARROW)) {
list.addAll(lambda.getAllOperationInvocations());
}
}
for(AnonymousClassDeclarationObject anonymous : initializer.getAnonymousClassDeclarations()) {
list.addAll(anonymous.getMethodInvocations());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gr.uom.java.xmi.decomposition;

import static gr.uom.java.xmi.Constants.JAVA;
import static gr.uom.java.xmi.decomposition.Visitor.stringify;

import java.util.ArrayList;
Expand Down Expand Up @@ -135,7 +136,9 @@ public List<AbstractCall> getAllOperationInvocations() {
List<AbstractCall> list = new ArrayList<>();
list.addAll(getMethodInvocations());
for(LambdaExpressionObject lambda : this.getLambdas()) {
list.addAll(lambda.getAllOperationInvocations());
if(lambda.getString().contains(JAVA.LAMBDA_ARROW)) {
list.addAll(lambda.getAllOperationInvocations());
}
}
for(AnonymousClassDeclarationObject anonymous : this.getAnonymousClassDeclarations()) {
list.addAll(anonymous.getMethodInvocations());
Expand Down

0 comments on commit 1fe5c30

Please sign in to comment.