Skip to content

Commit

Permalink
Handle zero length variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Dec 8, 2024
1 parent ef665c8 commit 30a0161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/gr/uom/java/xmi/decomposition/LeafMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -1076,13 +1076,13 @@ else if(parent1 != null && parent2 == null) {
List<LeafExpression> variables2 = parent2.getVariables();
Set<String> lowerCaseVariables1 = new LinkedHashSet<>();
for(LeafExpression variable1 : variables1) {
if(Character.isLowerCase(variable1.getString().charAt(0))) {
if(variable1.getString().length() > 0 && Character.isLowerCase(variable1.getString().charAt(0))) {
lowerCaseVariables1.add(variable1.getString());
}
}
Set<String> lowerCaseVariables2 = new LinkedHashSet<>();
for(LeafExpression variable2 : variables2) {
if(Character.isLowerCase(variable2.getString().charAt(0))) {
if(variable2.getString().length() > 0 && Character.isLowerCase(variable2.getString().charAt(0))) {
lowerCaseVariables2.add(variable2.getString());
}
}
Expand Down

0 comments on commit 30a0161

Please sign in to comment.