Skip to content

Commit 1146fac

Browse files
authored
Merge pull request #97 from bibonix/deps-upgrade-2026-05
Upgrade qulice to 0.27.6 and grizzly to 5.0.1
2 parents 4cd329d + dd937a9 commit 1146fac

34 files changed

Lines changed: 90 additions & 129 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: [17, 21]
20+
java: [21]
2121
steps:
2222
- uses: actions/checkout@v6
2323
- uses: actions/setup-java@v5

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<dependency>
143143
<groupId>org.glassfish.grizzly</groupId>
144144
<artifactId>grizzly-http-servlet-server</artifactId>
145-
<version>4.0.2</version>
145+
<version>5.0.1</version>
146146
<scope>test</scope>
147147
</dependency>
148148
<dependency>
@@ -214,7 +214,7 @@
214214
<plugin>
215215
<groupId>com.qulice</groupId>
216216
<artifactId>qulice-maven-plugin</artifactId>
217-
<version>0.25.1</version>
217+
<version>0.27.6</version>
218218
<configuration>
219219
<excludes combine.children="append">
220220
<exclude>findbugs:.*</exclude>

src/main/java/co/stateful/Atomic.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
@EqualsAndHashCode(of = { "callable", "lock" })
4747
public final class Atomic<T> implements Callable<T> {
4848

49+
/**
50+
* Default maximum waiting time, in milliseconds (five minutes).
51+
*/
52+
private static final long DEFAULT_MAX = TimeUnit.MINUTES.toMillis(5L);
53+
4954
/**
5055
* Random.
5156
*/
@@ -92,7 +97,7 @@ public Atomic(final Callable<T> clbl, final Lock lck) {
9297
* @param lbl Label to use for locking and unlocking (can be empty)
9398
*/
9499
public Atomic(final Callable<T> clbl, final Lock lck, final String lbl) {
95-
this(clbl, lck, lbl, TimeUnit.MINUTES.toMillis(5L));
100+
this(clbl, lck, lbl, Atomic.DEFAULT_MAX);
96101
}
97102

98103
// @checkstyle ParameterNumberCheck (15 lines)
@@ -184,5 +189,4 @@ public T callQuietly() {
184189
throw new IllegalStateException(ex);
185190
}
186191
}
187-
188192
}

src/main/java/co/stateful/Counter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
/**
1111
* Counter.
12-
*
1312
* @since 0.1
1413
*/
1514
@Immutable
@@ -36,5 +35,4 @@ public interface Counter {
3635
* @throws IOException If some I/O problem
3736
*/
3837
long incrementAndGet(long delta) throws IOException;
39-
4038
}

src/main/java/co/stateful/Counters.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
/**
1111
* Counters.
12-
*
1312
* @since 0.1
1413
*/
1514
@Immutable
@@ -44,5 +43,4 @@ public interface Counters {
4443
* @throws IOException If some I/O problem
4544
*/
4645
Counter get(String name) throws IOException;
47-
4846
}

src/main/java/co/stateful/Lock.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
/**
1111
* Lock.
12-
*
1312
* @since 0.3
1413
*/
1514
@Immutable
@@ -47,5 +46,4 @@ public interface Lock {
4746
* @since 0.11
4847
*/
4948
boolean unlock(String label) throws IOException;
50-
5149
}

src/main/java/co/stateful/Locks.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
/**
1111
* Locks.
12-
*
1312
* @since 0.2
1413
*/
1514
@Immutable
@@ -31,5 +30,4 @@ public interface Locks {
3130
* @throws IOException If fails
3231
*/
3332
Lock get(String name) throws IOException;
34-
3533
}

src/main/java/co/stateful/RtCounter.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
/**
2121
* Counter.
22-
*
2322
* @since 0.1
2423
* @checkstyle MultipleStringLiteralsCheck (500 lines)
2524
*/
@@ -29,6 +28,13 @@
2928
@EqualsAndHashCode(of = { "label", "request" })
3029
final class RtCounter implements Counter {
3130

31+
/**
32+
* XPath template to a counter operation link.
33+
* @checkstyle LineLength (3 lines)
34+
*/
35+
private static final String XPATH =
36+
"/page/counters/counter[name='%s']/links/link[@rel='%s']/@href";
37+
3238
/**
3339
* Its name.
3440
*/
@@ -95,13 +101,6 @@ private Request front(final String ops) throws IOException {
95101
.as(RestResponse.class)
96102
.assertStatus(HttpURLConnection.HTTP_OK)
97103
.as(XmlResponse.class)
98-
.rel(
99-
String.format(
100-
// @checkstyle LineLength (1 line)
101-
"/page/counters/counter[name='%s']/links/link[@rel='%s']/@href",
102-
this.label, ops
103-
)
104-
);
104+
.rel(String.format(RtCounter.XPATH, this.label, ops));
105105
}
106-
107106
}

src/main/java/co/stateful/RtCounters.java

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

2020
/**
2121
* Counters.
22-
*
2322
* @since 0.1
2423
* @checkstyle MultipleStringLiteralsCheck (500 lines)
2524
*/
@@ -29,6 +28,13 @@
2928
@EqualsAndHashCode(of = "request")
3029
final class RtCounters implements Counters {
3130

31+
/**
32+
* XPath template to a counter delete link.
33+
* @checkstyle LineLength (3 lines)
34+
*/
35+
private static final String XPATH_DELETE =
36+
"/page/counters/counter[name='%s']/links/link[@rel='delete']/@href";
37+
3238
/**
3339
* Entry request.
3440
*/
@@ -81,13 +87,7 @@ public void delete(final String name) throws IOException {
8187
.as(RestResponse.class)
8288
.assertStatus(HttpURLConnection.HTTP_OK)
8389
.as(XmlResponse.class)
84-
.rel(
85-
String.format(
86-
// @checkstyle LineLength (1 line)
87-
"/page/counters/counter[name='%s']/links/link[@rel='delete']/@href",
88-
name
89-
)
90-
)
90+
.rel(String.format(RtCounters.XPATH_DELETE, name))
9191
.header(HttpHeaders.ACCEPT, MediaType.TEXT_XML)
9292
.uri().queryParam("name", name).back()
9393
.fetch()

src/main/java/co/stateful/RtLock.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
/**
2222
* Lock.
23-
*
2423
* @since 0.3
2524
* @checkstyle MultipleStringLiteralsCheck (500 lines)
2625
*/
@@ -111,5 +110,4 @@ private Request front(final String label) throws IOException {
111110
.as(XmlResponse.class)
112111
.rel(String.format("/page/links/link[@rel='%s']/@href", label));
113112
}
114-
115113
}

0 commit comments

Comments
 (0)