Skip to content

Commit dd2eea6

Browse files
committed
Updated dependencies
1 parent a37f358 commit dd2eea6

11 files changed

Lines changed: 50 additions & 48 deletions

File tree

.mvn/wrapper/maven-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
wrapperVersion=3.3.2
17+
wrapperVersion=3.3.4
1818
distributionType=only-script
19-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![build-status](../../workflows/Build/badge.svg)](../../actions?query=workflow%3ABuild)
33
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.cowwoc.requirements/requirements/badge.svg)](https://central.sonatype.com/search?q=g:io.github.cowwoc.requirements)
44
<br>
5-
[![API](https://img.shields.io/badge/api_docs-5B45D5.svg)](https://cowwoc.github.io/requirements.java/12.0/)
5+
[![API](https://img.shields.io/badge/api_docs-5B45D5.svg)](https://cowwoc.github.io/requirements.java/12.1/)
66
[![Changelog](https://img.shields.io/badge/changelog-A345D5.svg)](docs/changelog.md)
77
[![javascript, typescript](https://img.shields.io/badge/other%20languages-javascript,%20typescript-457FD5.svg)](../../../requirements.js)
88

@@ -21,7 +21,7 @@ To get started, add this Maven dependency:
2121
<dependency>
2222
<groupId>io.github.cowwoc.requirements</groupId>
2323
<artifactId>requirements-java</artifactId>
24-
<version>12.0</version>
24+
<version>12.1</version>
2525
</dependency>
2626
```
2727

@@ -151,14 +151,14 @@ This library offers the following features:
151151
Designed for discovery using your favorite IDE's auto-complete feature.
152152
The main entry points are:
153153

154-
* [requireThat(value, name)](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html#requireThat(T,java.lang.String))
154+
* [requireThat(value, name)](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html#requireThat(T,java.lang.String))
155155
for method preconditions.
156-
* [that(value, name)](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html#that(T,java.lang.String))
156+
* [that(value, name)](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html#that(T,java.lang.String))
157157
for [class invariants, method postconditions and private methods](docs/features.md#assertion-support).
158-
* [checkIf(value, name)](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html#checkIf(T,java.lang.String))
158+
* [checkIf(value, name)](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html#checkIf(T,java.lang.String))
159159
for multiple failures and customized error handling.
160160

161-
See the [API documentation](https://cowwoc.github.io/requirements.java/12.0/) for more details.
161+
See the [API documentation](https://cowwoc.github.io/requirements.java/12.1/) for more details.
162162

163163
## Best practices
164164

docs/features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ requireThat(nameToAge, "nameToAge").
174174
## String diff
175175

176176
When
177-
a [String comparison](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/type/component/ObjectValidatorComponent#isEqualTo(java.lang.Object))
177+
a [String comparison](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/type/component/ObjectValidatorComponent#isEqualTo(java.lang.Object))
178178
fails, the library outputs a diff of the values being compared.
179179

180180
Depending on the terminal capability, you will see a [textual](textual_diff.md) or a [colored](colored_diff.md) diff.
@@ -188,7 +188,7 @@ terminal.
188188

189189
The use of colors is disabled by default if stdin or stdout are redirected, even if ANSI colors are supported.
190190
To enable colors,
191-
invoke [GlobalConfiguration.terminalEncoding(TerminalEncoding)](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/GlobalConfiguration.html#terminalEncoding(io.github.cowwoc.requirements12.java.TerminalEncoding)).
191+
invoke [GlobalConfiguration.terminalEncoding(TerminalEncoding)](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/GlobalConfiguration.html#terminalEncoding(io.github.cowwoc.requirements12.java.TerminalEncoding)).
192192

193193
## Returning the value after validation
194194

docs/supported_libraries.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Each module uses a separate class pair for validation. For example,
2-
[DefaultJavaValidators](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html)
2+
[DefaultJavaValidators](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/DefaultJavaValidators.html)
33
and
4-
[JavaValidators](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/JavaValidators.html)
4+
[JavaValidators](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/java/JavaValidators.html)
55
validate the core Java API. Similarly,
6-
[DefaultGuavaValidators](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/guava/DefaultGuavaValidators.html)
6+
[DefaultGuavaValidators](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/guava/DefaultGuavaValidators.html)
77
and
8-
[GuavaValidators](https://cowwoc.github.io/requirements.java/12.0/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/guava/GuavaValidators.html)
8+
[GuavaValidators](https://cowwoc.github.io/requirements.java/12.1/io.github.cowwoc.requirements.java/com/github/cowwoc/requirements12/guava/GuavaValidators.html)
99
validate the Guava API.
1010

1111
The following table lists validators for third-party libraries:

java/src/main/java/io/github/cowwoc/requirements12/java/MultipleFailuresException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public final class MultipleFailuresException extends RuntimeException
1414
{
1515
@Serial
1616
private static final long serialVersionUID = 0L;
17-
private transient final List<ValidationFailure> failures;
17+
private final transient List<ValidationFailure> failures;
1818

1919
/**
2020
* Creates a new exception.

java/src/main/java/io/github/cowwoc/requirements12/java/internal/terminal/Processes.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import java.io.IOException;
99
import java.io.InputStreamReader;
1010

11+
import static java.nio.charset.StandardCharsets.UTF_8;
12+
1113
/**
1214
* Process helper functions.
1315
*/
@@ -32,7 +34,7 @@ public static String run(String... command) throws IOException
3234
ProcessBuilder pb = new ProcessBuilder(command).redirectErrorStream(true);
3335
Process process = pb.start();
3436
StringBuilder result = new StringBuilder(80);
35-
try (BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())))
37+
try (BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream(), UTF_8)))
3638
{
3739
while (true)
3840
{

java/src/main/java/io/github/cowwoc/requirements12/java/internal/util/StampedLocks.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public static <V> V write(StampedLock lock, Callable<V> task)
123123
* @throws NullPointerException if {@code task} is null
124124
* @throws WrappedCheckedException if {@code task} throws a checked exception
125125
*/
126+
@SuppressWarnings("PMD.AvoidCatchingGenericException")
126127
private static void runTask(Runnable task)
127128
{
128129
try
@@ -144,6 +145,7 @@ private static void runTask(Runnable task)
144145
* @throws NullPointerException if {@code task} is null
145146
* @throws WrappedCheckedException if {@code task} throws a checked exception
146147
*/
148+
@SuppressWarnings("PMD.AvoidCatchingGenericException")
147149
private static <V> V runTask(Callable<V> task)
148150
{
149151
try
@@ -200,6 +202,7 @@ public static <V> V getLazilyInitializedValue(StampedLock lock, Supplier<V> supp
200202
* @return the initialized value
201203
* @throws NullPointerException if any of the arguments are null
202204
*/
205+
@SuppressWarnings("PMD.AvoidCatchingGenericException")
203206
private static <V> V getLazilyInitializedValueUsingRead(StampedLock lock, Supplier<V> supplier,
204207
Callable<V> initializer)
205208
{

java/src/main/java/io/github/cowwoc/requirements12/java/internal/validator/AbstractCollectionValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public S contains(E expected, String name)
9595
return containsImpl(expected, name);
9696
}
9797

98-
@SuppressWarnings("PMD.AvoidCatchingNPE")
98+
@SuppressWarnings("PMD.AvoidCatchingGenericException")
9999
private S containsImpl(E expected, String name)
100100
{
101101
if (value.validationFailed(v ->
@@ -136,7 +136,7 @@ public S doesNotContain(E unwanted, String name)
136136
return doesNotContainImpl(unwanted, name);
137137
}
138138

139-
@SuppressWarnings("PMD.AvoidCatchingNPE")
139+
@SuppressWarnings("PMD.AvoidCatchingGenericException")
140140
private S doesNotContainImpl(E unwanted, String name)
141141
{
142142
if (value.validationFailed(v ->

java/src/main/java/io/github/cowwoc/requirements12/java/internal/validator/JavaValidatorsImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
/**
6666
* The default implementation of JavaValidators.
6767
*/
68-
@SuppressWarnings("PMD.UnusedPrivateMethod")
6968
public final class JavaValidatorsImpl extends AbstractValidators<JavaValidators>
7069
implements JavaValidators
7170
{

pom.xml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@
5757
<project.root.basedir>${project.basedir}</project.root.basedir>
5858
<!-- <license.verbose>true</license.verbose>-->
5959
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
60-
<maven.version>3.9.9</maven.version>
61-
<maven.compiler.release>21</maven.compiler.release>
62-
<guava.version>33.4.8-jre</guava.version>
60+
<maven.version>3.9.12</maven.version>
61+
<maven.compiler.release>25</maven.compiler.release>
62+
<guava.version>33.5.0-jre</guava.version>
6363
<error_prone_annotations.version>2.26.1</error_prone_annotations.version>
64-
<jackson.version>2.19.1</jackson.version>
64+
<jackson.version>2.20.1</jackson.version>
6565
<slf4j.version>2.0.17</slf4j.version>
6666
<testng.version>7.11.0</testng.version>
6767
<jmh.version>1.37</jmh.version>
68-
<pmd.version>7.14.0</pmd.version>
68+
<pmd.version>7.20.0</pmd.version>
6969
<checkstyle.plugin.version>3.6.0</checkstyle.plugin.version>
7070
</properties>
7171

@@ -94,7 +94,7 @@
9494
<dependency>
9595
<groupId>org.apache.maven</groupId>
9696
<artifactId>maven-core</artifactId>
97-
<version>3.9.10</version>
97+
<version>3.9.12</version>
9898
</dependency>
9999
<dependency>
100100
<groupId>com.google.guava</groupId>
@@ -119,17 +119,17 @@
119119
<dependency>
120120
<groupId>ch.qos.logback</groupId>
121121
<artifactId>logback-classic</artifactId>
122-
<version>1.5.18</version>
122+
<version>1.5.24</version>
123123
</dependency>
124124
<dependency>
125125
<groupId>com.github.javaparser</groupId>
126126
<artifactId>javaparser-core</artifactId>
127-
<version>3.27.0</version>
127+
<version>3.27.1</version>
128128
</dependency>
129129
<dependency>
130130
<groupId>io.github.java-diff-utils</groupId>
131131
<artifactId>java-diff-utils</artifactId>
132-
<version>4.15</version>
132+
<version>4.16</version>
133133
</dependency>
134134
<dependency>
135135
<groupId>org.slf4j</groupId>
@@ -144,7 +144,7 @@
144144
<dependency>
145145
<groupId>io.github.cowwoc.pouch</groupId>
146146
<artifactId>pouch-core</artifactId>
147-
<version>9.0</version>
147+
<version>9.1</version>
148148
</dependency>
149149
<dependency>
150150
<groupId>org.twdata.maven</groupId>
@@ -159,7 +159,7 @@
159159
<dependency>
160160
<groupId>org.assertj</groupId>
161161
<artifactId>assertj-core</artifactId>
162-
<version>3.27.3</version>
162+
<version>3.27.6</version>
163163
</dependency>
164164
</dependencies>
165165
</dependencyManagement>
@@ -170,22 +170,22 @@
170170
<plugin>
171171
<groupId>org.apache.maven.plugins</groupId>
172172
<artifactId>maven-release-plugin</artifactId>
173-
<version>3.1.1</version>
173+
<version>3.3.1</version>
174174
</plugin>
175175
<plugin>
176176
<groupId>org.apache.maven.plugins</groupId>
177177
<artifactId>maven-compiler-plugin</artifactId>
178-
<version>3.14.0</version>
178+
<version>3.14.1</version>
179179
</plugin>
180180
<plugin>
181181
<groupId>org.apache.maven.plugins</groupId>
182182
<artifactId>maven-source-plugin</artifactId>
183-
<version>3.3.1</version>
183+
<version>3.4.0</version>
184184
</plugin>
185185
<plugin>
186186
<groupId>org.apache.maven.plugins</groupId>
187187
<artifactId>maven-javadoc-plugin</artifactId>
188-
<version>3.11.2</version>
188+
<version>3.12.0</version>
189189
<executions>
190190
<execution>
191191
<id>default-cli</id>
@@ -230,7 +230,7 @@
230230
<plugin>
231231
<groupId>org.apache.maven.plugins</groupId>
232232
<artifactId>maven-surefire-plugin</artifactId>
233-
<version>3.5.3</version>
233+
<version>3.5.4</version>
234234
</plugin>
235235
<plugin>
236236
<groupId>org.apache.maven.plugins</groupId>
@@ -250,27 +250,27 @@
250250
<plugin>
251251
<groupId>org.apache.maven.plugins</groupId>
252252
<artifactId>maven-jar-plugin</artifactId>
253-
<version>3.4.2</version>
253+
<version>3.5.0</version>
254254
</plugin>
255255
<plugin>
256256
<groupId>org.apache.maven.plugins</groupId>
257257
<artifactId>maven-resources-plugin</artifactId>
258-
<version>3.3.1</version>
258+
<version>3.4.0</version>
259259
</plugin>
260260
<plugin>
261261
<groupId>org.codehaus.mojo</groupId>
262262
<artifactId>license-maven-plugin</artifactId>
263-
<version>2.5.0</version>
263+
<version>2.7.1</version>
264264
</plugin>
265265
<plugin>
266266
<groupId>org.apache.maven.plugins</groupId>
267267
<artifactId>maven-dependency-plugin</artifactId>
268-
<version>3.8.1</version>
268+
<version>3.9.0</version>
269269
</plugin>
270270
<plugin>
271271
<groupId>org.apache.maven.plugins</groupId>
272272
<artifactId>maven-pmd-plugin</artifactId>
273-
<version>3.26.0</version>
273+
<version>3.28.0</version>
274274
<dependencies>
275275
<dependency>
276276
<groupId>net.sourceforge.pmd</groupId>
@@ -302,7 +302,7 @@
302302
<dependency>
303303
<groupId>com.puppycrawl.tools</groupId>
304304
<artifactId>checkstyle</artifactId>
305-
<version>10.25.0</version>
305+
<version>11.0.0</version>
306306
</dependency>
307307
</dependencies>
308308
<configuration>
@@ -325,7 +325,7 @@
325325
<plugin>
326326
<groupId>org.apache.maven.plugins</groupId>
327327
<artifactId>maven-gpg-plugin</artifactId>
328-
<version>3.2.7</version>
328+
<version>3.2.8</version>
329329
<executions>
330330
<execution>
331331
<id>sign-artifacts</id>
@@ -342,7 +342,7 @@
342342
<plugin>
343343
<groupId>org.codehaus.mojo</groupId>
344344
<artifactId>versions-maven-plugin</artifactId>
345-
<version>2.18.0</version>
345+
<version>2.20.1</version>
346346
<configuration>
347347
<ruleSet>
348348
<rules>
@@ -374,7 +374,7 @@
374374
<plugin>
375375
<groupId>org.apache.maven.plugins</groupId>
376376
<artifactId>maven-enforcer-plugin</artifactId>
377-
<version>3.5.0</version>
377+
<version>3.6.2</version>
378378
<executions>
379379
<execution>
380380
<id>enforce-maven</id>
@@ -394,7 +394,7 @@
394394
<plugin>
395395
<groupId>org.apache.maven.plugins</groupId>
396396
<artifactId>maven-release-plugin</artifactId>
397-
<version>3.1.1</version>
397+
<version>3.3.1</version>
398398
<configuration>
399399
<autoVersionSubmodules>true</autoVersionSubmodules>
400400
<tagNameFormat>release-@{project.version}</tagNameFormat>

0 commit comments

Comments
 (0)