|
21 | 21 | import org.cactoos.map.MapOf; |
22 | 22 | import org.cactoos.text.TextOf; |
23 | 23 | import org.cactoos.text.UncheckedText; |
24 | | -import org.eolang.parser.ObjectName; |
| 24 | +import org.eolang.parser.OnDefault; |
25 | 25 | import org.w3c.dom.Node; |
26 | 26 |
|
27 | 27 | /** |
@@ -64,7 +64,7 @@ public Collection<Defect> defects(final Map<String, XML> pkg) throws IOException |
64 | 64 | .filter(search.get(xpath)) |
65 | 65 | .forEach( |
66 | 66 | o -> { |
67 | | - final String current = new ObjectName( |
| 67 | + final String current = new OnDefault( |
68 | 68 | new XMLDocument(src.node()) |
69 | 69 | ).get(); |
70 | 70 | final int cline = Integer.parseInt( |
@@ -128,7 +128,7 @@ private static Map<Xnav, Map<String, List<Integer>>> scanUsages(final Map<String |
128 | 128 | if (LtInconsistentArgs.voidAttribute(base, o)) { |
129 | 129 | ref = LtInconsistentArgs.voidFqn(base, o); |
130 | 130 | } else { |
131 | | - ref = String.format("%s.%s", new ObjectName(source).get(), base); |
| 131 | + ref = String.format("%s.%s", new OnDefault(source).get(), base); |
132 | 132 | } |
133 | 133 | } else { |
134 | 134 | ref = base; |
@@ -204,7 +204,7 @@ private static Map<String, List<Integer>> clashes( |
204 | 204 | .filter(search.get(xpath)) |
205 | 205 | .forEach( |
206 | 206 | o -> { |
207 | | - final String program = new ObjectName( |
| 207 | + final String program = new OnDefault( |
208 | 208 | new XMLDocument(src.node()) |
209 | 209 | ).get(); |
210 | 210 | final int line = Integer.parseInt( |
@@ -336,10 +336,10 @@ private static Map<String, Predicate<Xnav>> fqnToSearch(final String fqn, final |
336 | 336 | * @return Relativized object base |
337 | 337 | */ |
338 | 338 | private static String relativizeToTopObject(final String base, final Xnav source) { |
339 | | - final String top = new ObjectName(source).get(); |
| 339 | + final String top = new OnDefault(source).get(); |
340 | 340 | final String result; |
341 | 341 | if (base.startsWith(String.format("%s.$.", top))) { |
342 | | - result = base.replace(String.format("%s.", new ObjectName(source).get()), ""); |
| 342 | + result = base.replace(String.format("%s.", new OnDefault(source).get()), ""); |
343 | 343 | } else { |
344 | 344 | result = base; |
345 | 345 | } |
|
0 commit comments