Skip to content

Commit 77807cb

Browse files
committed
Bump deps to latest stable; drop Java 11; align with qulice 0.27.6
1 parent 5aee83b commit 77807cb

18 files changed

Lines changed: 52 additions & 62 deletions

.github/workflows/mvn.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ubuntu-24.04, windows-2022, macos-15]
20-
java: [11, 17]
20+
java: [17, 21]
2121
steps:
2222
- uses: actions/checkout@v4
2323
- uses: actions/setup-java@v4

pom.xml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>com.jcabi</groupId>
1010
<artifactId>parent</artifactId>
11-
<version>0.68.0</version>
11+
<version>0.73.1</version>
1212
</parent>
1313
<groupId>org.eolang</groupId>
1414
<artifactId>xax</artifactId>
@@ -66,17 +66,17 @@
6666
<dependency>
6767
<groupId>org.yaml</groupId>
6868
<artifactId>snakeyaml</artifactId>
69-
<version>2.4</version>
69+
<version>2.6</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>com.jcabi</groupId>
7373
<artifactId>jcabi-xml</artifactId>
74-
<version>0.33.5</version>
74+
<version>0.35.0</version>
7575
</dependency>
7676
<dependency>
7777
<groupId>org.cactoos</groupId>
7878
<artifactId>cactoos</artifactId>
79-
<version>0.57.0</version>
79+
<version>0.61.0</version>
8080
</dependency>
8181
<dependency>
8282
<groupId>com.yegor256</groupId>
@@ -86,7 +86,13 @@
8686
<dependency>
8787
<groupId>org.junit.jupiter</groupId>
8888
<artifactId>junit-jupiter-api</artifactId>
89-
<version>5.11.4</version>
89+
<version>6.0.3</version>
90+
<scope>provided</scope>
91+
</dependency>
92+
<dependency>
93+
<groupId>org.opentest4j</groupId>
94+
<artifactId>opentest4j</artifactId>
95+
<version>1.3.0</version>
9096
<scope>provided</scope>
9197
</dependency>
9298
<dependency>
@@ -98,7 +104,7 @@
98104
<dependency>
99105
<groupId>net.sf.saxon</groupId>
100106
<artifactId>Saxon-HE</artifactId>
101-
<version>12.8</version>
107+
<version>12.9</version>
102108
<scope>runtime</scope>
103109
</dependency>
104110
<dependency>
@@ -122,13 +128,13 @@
122128
<dependency>
123129
<groupId>com.yegor256</groupId>
124130
<artifactId>jping</artifactId>
125-
<version>0.0.3</version>
131+
<version>0.1.0</version>
126132
<scope>test</scope>
127133
</dependency>
128134
<dependency>
129135
<groupId>org.eolang</groupId>
130136
<artifactId>eo-parser</artifactId>
131-
<version>0.51.6</version>
137+
<version>0.61.0</version>
132138
<scope>test</scope>
133139
</dependency>
134140
</dependencies>
@@ -137,7 +143,7 @@
137143
<plugin>
138144
<groupId>org.pitest</groupId>
139145
<artifactId>pitest-maven</artifactId>
140-
<version>1.20.0</version>
146+
<version>1.23.1</version>
141147
<executions>
142148
<execution>
143149
<goals>
@@ -168,7 +174,7 @@
168174
<plugin>
169175
<groupId>com.qulice</groupId>
170176
<artifactId>qulice-maven-plugin</artifactId>
171-
<version>0.24.0</version>
177+
<version>0.27.6</version>
172178
<configuration>
173179
<excludes combine.children="append">
174180
<exclude>checkstyle:/src/site/resources/.*</exclude>

src/main/java/org/eolang/xax/XtSticky.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/**
1515
* A decorator of {@link Xtory} that guarantees any method is only
1616
* delegated to the decoratee only once.
17-
*
1817
* @since 0.1.0
1918
*/
2019
public final class XtSticky implements Xtory {
@@ -27,7 +26,7 @@ public final class XtSticky implements Xtory {
2726
/**
2827
* The cache.
2928
*/
30-
private final ConcurrentHashMap<String, Object> cache;
29+
private final Map<String, Object> cache;
3130

3231
/**
3332
* Ctor.
@@ -77,5 +76,4 @@ private <T> T through(final String method, final Supplier<T> supplier) {
7776
s -> supplier.get()
7877
);
7978
}
80-
8179
}

src/main/java/org/eolang/xax/XtStrict.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* A decorator of {@link Xtory} that checks the validity
1515
* of XML against the XSD schema attached to it, right before
1616
* returning it at {@link Xtory#after()} and {@link Xtory#before()}.
17-
*
1817
* @since 0.4.0
1918
*/
2019
public final class XtStrict implements Xtory {

src/main/java/org/eolang/xax/XtStrictAfter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* A decorator of {@link Xtory} that checks the validity
1515
* of XML against the XSD schema attached to it, right before
1616
* returning it at {@link Xtory#after()}.
17-
*
1817
* @since 0.4.0
1918
*/
2019
public final class XtStrictAfter implements Xtory {

src/main/java/org/eolang/xax/XtStrictBefore.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* A decorator of {@link Xtory} that checks the validity
1515
* of XML against the XSD schema attached to it, right before
1616
* returning it at {@link Xtory#before()}.
17-
*
1817
* @since 0.4.0
1918
*/
2019
public final class XtStrictBefore implements Xtory {

src/main/java/org/eolang/xax/XtYaml.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,17 @@
1313
import com.yegor256.xsline.TrDefault;
1414
import com.yegor256.xsline.Train;
1515
import com.yegor256.xsline.Xsline;
16-
import java.io.FileNotFoundException;
16+
import java.io.IOException;
1717
import java.nio.file.Paths;
18+
import java.util.ArrayList;
1819
import java.util.Arrays;
1920
import java.util.Collection;
20-
import java.util.LinkedList;
2121
import java.util.Map;
2222
import org.yaml.snakeyaml.Yaml;
2323

2424
/**
2525
* A story parsed from YAML and then processed through XSL
2626
* stylesheets.
27-
*
2827
* @since 0.1.0
2928
*/
3029
public final class XtYaml implements Xtory {
@@ -133,7 +132,7 @@ public Xsline xsline() {
133132
new XSLDocument(Paths.get(sheet.substring(7)))
134133
)
135134
);
136-
} catch (final FileNotFoundException ex) {
135+
} catch (final IOException ex) {
137136
throw new IllegalArgumentException(ex);
138137
}
139138
} else {
@@ -150,11 +149,10 @@ public Collection<String> asserts() {
150149
if (asserts == null) {
151150
asserts = Arrays.asList();
152151
}
153-
final Collection<String> xpaths = new LinkedList<>();
152+
final Collection<String> xpaths = new ArrayList<>(0);
154153
for (final String xpath : (Iterable<String>) asserts) {
155154
xpaths.add(xpath);
156155
}
157156
return xpaths;
158157
}
159-
160158
}

src/main/java/org/eolang/xax/Xtory.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
/**
1313
* A story about XML processed through XSL stylesheets.
14-
*
1514
* @since 0.4.0
1615
*/
1716
public interface Xtory {
@@ -48,9 +47,9 @@ public interface Xtory {
4847

4948
/**
5049
* A parser of a {@link String} to {@link XML}.
51-
*
5250
* @since 0.4.0
5351
*/
52+
@FunctionalInterface
5453
interface Parser {
5554

5655
/**
@@ -60,6 +59,5 @@ interface Parser {
6059
* @throws Exception If fails
6160
*/
6261
XML parse(String input) throws Exception;
63-
6462
}
6563
}

src/main/java/org/eolang/xax/XtoryMatcher.java

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import com.jcabi.xml.XML;
88
import java.util.AbstractMap;
9+
import java.util.ArrayList;
910
import java.util.Collection;
10-
import java.util.LinkedList;
1111
import java.util.Map;
1212
import org.hamcrest.BaseMatcher;
1313
import org.hamcrest.Description;
@@ -16,10 +16,8 @@
1616

1717
/**
1818
* Hamcrest matcher for a YAML story.
19-
*
2019
* @since 0.1.0
2120
*/
22-
@SuppressWarnings("PMD.ConstructorShouldDoInitialization")
2321
public final class XtoryMatcher extends BaseMatcher<Xtory> {
2422

2523
/**
@@ -79,7 +77,7 @@ public boolean matches(final Object object) {
7977
Assumptions.assumeTrue(xtory.map().get("skip") == null);
8078
final XML after = xtory.xsline().pass(xtory.before());
8179
final Collection<Map.Entry<String, Boolean>> xpaths =
82-
new LinkedList<>();
80+
new ArrayList<>(0);
8381
int failures = 0;
8482
for (final String xpath : xtory.asserts()) {
8583
final boolean success = !after.nodes(xpath).isEmpty();
@@ -92,28 +90,35 @@ public boolean matches(final Object object) {
9290
"All %d XPath expressions matched",
9391
xpaths.size()
9492
);
95-
final StringBuilder sum = new StringBuilder(1024)
96-
.append(String.format("%d XPath expression(s) failed:\n", failures));
93+
final StringBuilder sum = new StringBuilder(1024).append(
94+
String.format("%d XPath expression(s) failed:%n", failures)
95+
);
9796
for (final Map.Entry<String, Boolean> ent : xpaths) {
9897
sum.append(" ");
9998
if (ent.getValue()) {
10099
sum.append("OK");
101100
} else {
102101
sum.append("FAIL");
103102
}
104-
sum.append(": ").append(ent.getKey()).append('\n');
103+
sum.append(": ").append(ent.getKey()).append(System.lineSeparator());
105104
}
106-
sum
107-
.append("\nXML before XSL transformation:\n ")
108-
.append(xtory.before().toString().replace("\n", "\n "))
109-
.append(
110-
String.format(
111-
"\nXML after XSL transformation (%d->%d chars):\n ",
112-
xtory.before().toString().length(),
113-
after.toString().length()
114-
)
105+
sum.append(
106+
String.format("%nXML before XSL transformation:%n ")
107+
).append(
108+
xtory.before().toString().replace(
109+
System.lineSeparator(), String.format("%n ")
110+
)
111+
).append(
112+
String.format(
113+
"%nXML after XSL transformation (%d->%d chars):%n ",
114+
xtory.before().toString().length(),
115+
after.toString().length()
116+
)
117+
).append(
118+
after.toString().replace(
119+
System.lineSeparator(), String.format("%n ")
115120
)
116-
.append(after.toString().replace("\n", "\n "));
121+
);
117122
this.summary = sum.toString();
118123
this.match = true;
119124
for (final Map.Entry<String, Boolean> ent : xpaths) {
@@ -139,8 +144,7 @@ public void describeMismatch(final Object story, final Description desc) {
139144
if (this.match) {
140145
this.extra.describeMismatch(story, desc);
141146
} else {
142-
desc.appendText("\n").appendText(this.summary);
147+
desc.appendText(System.lineSeparator()).appendText(this.summary);
143148
}
144149
}
145-
146150
}

src/main/java/org/eolang/xax/package-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
/**
77
* XPath Assertions for XSL.
8-
*
98
* @since 0.0.1
109
*/
1110
package org.eolang.xax;

0 commit comments

Comments
 (0)