Skip to content

Commit

Permalink
feat(objectionary#114): lower CC
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Jan 3, 2025
1 parent 2b88016 commit e2ea4b1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/org/eolang/lints/errors/LtObjectIsNotUnique.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ public Collection<Defect> defects(final Map<String, XML> pkg) {
if (oth.nodes("/program/objects/o").isEmpty()) {
continue;
}
final Map<String, String> other = LtObjectIsNotUnique.programObjects(oth);
for (final Map.Entry<String, String> object : other.entrySet()) {
for (
final Map.Entry<String, String> object : LtObjectIsNotUnique.programObjects(oth)
.entrySet()
) {
final String name = object.getKey();
if (!LtObjectIsNotUnique.containDuplicate(xmir, oth, name)) {
if (!LtObjectIsNotUnique.containsDuplicate(xmir, oth, name)) {
continue;
}
defects.add(
Expand Down Expand Up @@ -102,7 +104,7 @@ public String motive() throws Exception {
).asString();
}

private static boolean containDuplicate(final XML original, final XML oth, final String name) {
private static boolean containsDuplicate(final XML original, final XML oth, final String name) {
return LtObjectIsNotUnique.programObjects(original).containsKey(name)
&& LtObjectIsNotUnique.packageName(oth)
.equals(LtObjectIsNotUnique.packageName(original));
Expand Down

0 comments on commit e2ea4b1

Please sign in to comment.