From e2ea4b146792369f36e732b4791f2eddddd962dc Mon Sep 17 00:00:00 2001 From: h1alexbel Date: Fri, 3 Jan 2025 13:11:29 +0300 Subject: [PATCH] feat(#114): lower CC --- .../org/eolang/lints/errors/LtObjectIsNotUnique.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/eolang/lints/errors/LtObjectIsNotUnique.java b/src/main/java/org/eolang/lints/errors/LtObjectIsNotUnique.java index dc424eb7..ede019aa 100644 --- a/src/main/java/org/eolang/lints/errors/LtObjectIsNotUnique.java +++ b/src/main/java/org/eolang/lints/errors/LtObjectIsNotUnique.java @@ -65,10 +65,12 @@ public Collection defects(final Map pkg) { if (oth.nodes("/program/objects/o").isEmpty()) { continue; } - final Map other = LtObjectIsNotUnique.programObjects(oth); - for (final Map.Entry object : other.entrySet()) { + for ( + final Map.Entry 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( @@ -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));