Skip to content

Commit 62ec664

Browse files
authored
Merge pull request #279 from volodya-lombrozo/274_xnav
feat(#274): update xnav library up to 0.1.4
2 parents afbcf94 + 4f75b29 commit 62ec664

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ SOFTWARE.
144144
<dependency>
145145
<groupId>com.github.volodya-lombrozo</groupId>
146146
<artifactId>xnav</artifactId>
147-
<version>0.1.3</version>
147+
<version>0.1.4</version>
148148
</dependency>
149149
<dependency>
150150
<groupId>org.apache.opennlp</groupId>

src/main/java/org/eolang/lints/LtByXsl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
package org.eolang.lints;
2525

2626
import com.github.lombrozo.xnav.Filter;
27-
import com.github.lombrozo.xnav.Navigator;
27+
import com.github.lombrozo.xnav.Xnav;
2828
import com.jcabi.xml.ClasspathSources;
2929
import com.jcabi.xml.XML;
3030
import com.jcabi.xml.XMLDocument;
@@ -168,7 +168,7 @@ private int lineno(final XML defect) {
168168
* @return Name of the program.
169169
*/
170170
private static String findName(final XML program) {
171-
return new Navigator(program.inner())
171+
return new Xnav(program.inner())
172172
.element("program")
173173
.attribute("name")
174174
.text()
@@ -181,11 +181,11 @@ private static String findName(final XML program) {
181181
* @return Collection of defects.
182182
*/
183183
private static Collection<XML> findDefects(final XML report) {
184-
return new Navigator(report.inner())
184+
return new Xnav(report.inner())
185185
.element("defects")
186186
.elements(Filter.withName("defect"))
187-
.map(Navigator::copy)
188-
.map(Navigator::node)
187+
.map(Xnav::copy)
188+
.map(Xnav::node)
189189
.map(XMLDocument::new)
190190
.collect(Collectors.toList());
191191
}

src/test/java/benchmarks/ProgramsBench.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public class ProgramsBench {
6262
*/
6363
private final Path home;
6464

65+
@SuppressWarnings("PMD.ConstructorOnlyInitializesOrCallOtherConstructors")
6566
public ProgramsBench() {
6667
try {
6768
this.home = Files.createTempDirectory("tmp");

src/test/java/fixtures/LargeXmir.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,22 @@
4343
*/
4444
public final class LargeXmir implements Scalar<XML> {
4545

46+
/**
47+
* Name of the program.
48+
*/
4649
private final String name;
4750

51+
/**
52+
* Constructor.
53+
*/
4854
public LargeXmir() {
4955
this("unknown");
5056
}
5157

58+
/**
59+
* Constructor.
60+
* @param nme Program name.
61+
*/
5262
public LargeXmir(final String nme) {
5363
this.name = nme;
5464
}

0 commit comments

Comments
 (0)