Skip to content

Commit 7298789

Browse files
Artem LabazinArtem Labazin
authored andcommitted
Update the project
1 parent 3161bcf commit 7298789

File tree

8 files changed

+66
-43
lines changed

8 files changed

+66
-43
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ jdk:
55
- oraclejdk8
66

77
install:
8-
mvn --settings .settings.xml install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip -B -V
8+
./mvnw --settings .settings.xml install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip -B -V
99

1010
script:
11-
mvn --settings .settings.xml clean verify -DskipTests=false -Dmaven.javadoc.skip=true -Dgpg.skip -B -U
11+
./mvnw --settings .settings.xml clean verify -DskipTests=false -Dmaven.javadoc.skip=true -Dgpg.skip -B -U
1212

1313
before_deploy:
14-
- mvn help:evaluate -N -Dexpression=project.version | grep -v '\['
15-
- export project_version=$(mvn help:evaluate -N -Dexpression=project.version | grep -v '\[')
14+
- ./mvnw help:evaluate -N -Dexpression=project.version | grep -v '\['
15+
- export project_version=$(./mvnw help:evaluate -N -Dexpression=project.version | grep -v '\[')
1616
- echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import
1717
- echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust
1818
- sed -i -- "s/\${env.SONATYPE_PASSWORD}/$SONATYPE_PASSWORD/g" .settings.xml
19-
- mvn --settings .settings.xml clean deploy -DskipTests=true -Dmaven.javadoc.skip=false -B -U
19+
- ./mvnw --settings .settings.xml clean deploy -DskipTests=true -Dmaven.javadoc.skip=false -B -U
2020

2121
deploy:
2222
provider: releases

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
- Add more tests.
1313
- Add `JavaDoc`.
1414

15+
## [1.16.3](https://github.com/appulse-projects/utils-java/releases/tag/1.16.3) - 2019-05-29
16+
17+
### Changed
18+
19+
- Updated dependencies;
20+
- Force the Travise use Maven wrapper instead of direct version;
21+
- Some PMD errors.
22+
1523
## [1.16.2](https://github.com/appulse-projects/utils-java/releases/tag/1.16.2) - 2019-04-26
1624

1725
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $> mvn clean compile
3636
[INFO] BUILD SUCCESS
3737
[INFO] ------------------------------------------------------------------------
3838
[INFO] Total time: 10.522 s
39-
[INFO] Finished at: 2019-02-14T15:31:22+03:00
39+
[INFO] Finished at: 2019-05-19T15:31:22+03:00
4040
[INFO] Final Memory: 43M/512M
4141
[INFO] ------------------------------------------------------------------------
4242
```

pom.xml

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ limitations under the License.
2424

2525
<groupId>io.appulse</groupId>
2626
<artifactId>utils-java</artifactId>
27-
<version>1.16.2</version>
27+
<version>1.16.3</version>
2828
<packaging>jar</packaging>
2929

3030
<properties>
@@ -66,7 +66,7 @@ limitations under the License.
6666
<url>https://github.com/appulse-projects/utils-java</url>
6767
<connection>scm:git:https://github.com/appulse-projects/utils-java.git</connection>
6868
<developerConnection>scm:git:https://github.com/appulse-projects/utils-java.git</developerConnection>
69-
<tag>1.16.2</tag>
69+
<tag>1.16.3</tag>
7070
</scm>
7171

7272
<distributionManagement>
@@ -102,60 +102,56 @@ limitations under the License.
102102
<dependency>
103103
<groupId>org.projectlombok</groupId>
104104
<artifactId>lombok</artifactId>
105-
<version>1.18.6</version>
105+
<version>1.18.8</version>
106106
<scope>provided</scope>
107107
</dependency>
108108

109109
<dependency>
110110
<groupId>io.netty</groupId>
111111
<artifactId>netty-buffer</artifactId>
112-
<version>4.1.33.Final</version>
112+
<version>4.1.36.Final</version>
113113
<scope>compile</scope>
114114
<optional>true</optional>
115115
</dependency>
116116

117-
<dependency>
118-
<groupId>org.slf4j</groupId>
119-
<artifactId>slf4j-api</artifactId>
120-
<version>1.7.26</version>
121-
</dependency>
122117
<dependency>
123118
<groupId>io.appulse</groupId>
124119
<artifactId>logging-java</artifactId>
125-
<version>1.1.1</version>
126-
<scope>provided</scope>
120+
<version>1.1.2</version>
121+
<scope>compile</scope>
122+
<optional>true</optional>
127123
</dependency>
128124

129125
<dependency>
130126
<groupId>org.junit.jupiter</groupId>
131127
<artifactId>junit-jupiter-engine</artifactId>
132-
<version>5.4.0</version>
128+
<version>5.4.2</version>
133129
<scope>test</scope>
134130
</dependency>
135131
<dependency>
136132
<groupId>org.junit.jupiter</groupId>
137133
<artifactId>junit-jupiter-params</artifactId>
138-
<version>5.4.0</version>
134+
<version>5.4.2</version>
139135
<scope>test</scope>
140136
</dependency>
141137

142138
<dependency>
143139
<groupId>org.assertj</groupId>
144140
<artifactId>assertj-core</artifactId>
145-
<version>3.12.0</version>
141+
<version>3.12.2</version>
146142
<scope>test</scope>
147143
</dependency>
148144

149145
<dependency>
150146
<groupId>org.mockito</groupId>
151147
<artifactId>mockito-core</artifactId>
152-
<version>2.24.5</version>
148+
<version>2.27.0</version>
153149
<scope>test</scope>
154150
</dependency>
155151
<dependency>
156152
<groupId>org.mockito</groupId>
157153
<artifactId>mockito-junit-jupiter</artifactId>
158-
<version>2.24.5</version>
154+
<version>2.27.5</version>
159155
<scope>test</scope>
160156
</dependency>
161157

@@ -181,15 +177,10 @@ limitations under the License.
181177

182178
<build>
183179
<plugins>
184-
<plugin>
185-
<groupId>org.apache.maven.plugins</groupId>
186-
<artifactId>maven-compiler-plugin</artifactId>
187-
<version>3.8.0</version>
188-
</plugin>
189180
<plugin>
190181
<groupId>org.apache.maven.plugins</groupId>
191182
<artifactId>maven-source-plugin</artifactId>
192-
<version>3.0.1</version>
183+
<version>3.1.0</version>
193184
<executions>
194185
<execution>
195186
<id>attach-sources</id>
@@ -203,7 +194,7 @@ limitations under the License.
203194
<plugin>
204195
<groupId>pl.project13.maven</groupId>
205196
<artifactId>git-commit-id-plugin</artifactId>
206-
<version>2.2.6</version>
197+
<version>3.0.0</version>
207198
<executions>
208199
<execution>
209200
<id>git-infos</id>
@@ -233,7 +224,7 @@ limitations under the License.
233224
<plugin>
234225
<groupId>org.apache.maven.plugins</groupId>
235226
<artifactId>maven-javadoc-plugin</artifactId>
236-
<version>3.0.1</version>
227+
<version>3.1.0</version>
237228
<configuration>
238229
<additionalOptions>-Xdoclint:none</additionalOptions>
239230
<additionalparam>-Xdoclint:none</additionalparam>
@@ -260,7 +251,7 @@ limitations under the License.
260251
<plugin>
261252
<groupId>org.apache.maven.plugins</groupId>
262253
<artifactId>maven-surefire-plugin</artifactId>
263-
<version>2.22.1</version>
254+
<version>2.22.2</version>
264255
<configuration>
265256
<skipTests>${skipAllTests}</skipTests>
266257
<trimStackTrace>false</trimStackTrace>
@@ -282,7 +273,7 @@ limitations under the License.
282273
<plugin>
283274
<groupId>org.apache.maven.plugins</groupId>
284275
<artifactId>maven-failsafe-plugin</artifactId>
285-
<version>2.22.1</version>
276+
<version>2.22.2</version>
286277
<configuration>
287278
<skipITs>${skipAllTests}</skipITs>
288279
<trimStackTrace>false</trimStackTrace>
@@ -331,7 +322,7 @@ limitations under the License.
331322
<plugin>
332323
<groupId>org.apache.maven.plugins</groupId>
333324
<artifactId>maven-pmd-plugin</artifactId>
334-
<version>3.11.0</version>
325+
<version>3.12.0</version>
335326
<configuration>
336327
<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
337328
<targetJdk>${maven.compiler.source}</targetJdk>
@@ -357,12 +348,12 @@ limitations under the License.
357348
<plugin>
358349
<groupId>org.apache.maven.plugins</groupId>
359350
<artifactId>maven-checkstyle-plugin</artifactId>
360-
<version>3.0.0</version>
351+
<version>3.1.0</version>
361352
<dependencies>
362353
<dependency>
363354
<groupId>com.puppycrawl.tools</groupId>
364355
<artifactId>checkstyle</artifactId>
365-
<version>8.18</version>
356+
<version>8.21</version>
366357
</dependency>
367358
</dependencies>
368359
<executions>
@@ -419,14 +410,38 @@ limitations under the License.
419410
</execution>
420411
</executions>
421412
</plugin>
413+
414+
<plugin>
415+
<groupId>org.apache.maven.plugins</groupId>
416+
<artifactId>maven-enforcer-plugin</artifactId>
417+
<version>3.0.0-M2</version>
418+
<executions>
419+
<execution>
420+
<id>enforce-versions</id>
421+
<goals>
422+
<goal>enforce</goal>
423+
</goals>
424+
<configuration>
425+
<rules>
426+
<requireMavenVersion>
427+
<version>3.6.0</version>
428+
</requireMavenVersion>
429+
<requireJavaVersion>
430+
<version>${java.version}</version>
431+
</requireJavaVersion>
432+
</rules>
433+
</configuration>
434+
</execution>
435+
</executions>
436+
</plugin>
422437
</plugins>
423438
</build>
424439

425440
<profiles>
426441
<profile>
427442
<id>module-java</id>
428443
<activation>
429-
<jdk>[9,12)</jdk>
444+
<jdk>[9,13)</jdk>
430445
</activation>
431446
<build>
432447
<plugins>

src/main/java/io/appulse/utils/ReadBytesUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public static int read (@NonNull File file, byte[] buffer, int offset, int lengt
445445
* @return the total number of bytes read into the buffer.
446446
*/
447447
@SneakyThrows
448-
public static int read (@NonNull Path path, @NonNull byte[] buffer, int offset, int length) {
448+
public static int read (@NonNull Path path, byte[] buffer, int offset, int length) {
449449
try (val channel = Files.newByteChannel(path, READ)) {
450450
return read(channel, buffer, offset, length);
451451
}
@@ -505,7 +505,7 @@ public static int read (@NonNull File file, Bytes buffer, int length) {
505505
* @return the total number of bytes read into the buffer.
506506
*/
507507
@SneakyThrows
508-
public static int read (@NonNull Path path, @NonNull Bytes buffer, int length) {
508+
public static int read (@NonNull Path path, Bytes buffer, int length) {
509509
try (val channel = Files.newByteChannel(path, READ)) {
510510
return read(channel, buffer, length);
511511
}
@@ -564,7 +564,7 @@ public static int read (@NonNull File file, ByteBuffer buffer, int length) {
564564
* @return the total number of bytes read into the buffer.
565565
*/
566566
@SneakyThrows
567-
public static int read (@NonNull Path path, @NonNull ByteBuffer buffer, int length) {
567+
public static int read (@NonNull Path path, ByteBuffer buffer, int length) {
568568
try (val channel = Files.newByteChannel(path, READ)) {
569569
return read(channel, buffer, length);
570570
}

src/main/java/io/appulse/utils/SocketUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
public final class SocketUtils {
3737

3838
public static Optional<Integer> findFreePort () {
39-
return findFreePort(1024, 65535);
39+
return findFreePort(1024, 65_535);
4040
}
4141

4242
public static Optional<Integer> findFreePort (int from, int to) {

src/main/java/io/appulse/utils/WriteBytesUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public static int write (Path path, @NonNull Bytes buffer) {
213213
}
214214

215215
@SneakyThrows
216-
public static int write (@NonNull Path path, @NonNull Bytes buffer, int length) {
216+
public static int write (@NonNull Path path, Bytes buffer, int length) {
217217
try (val channel = Files.newByteChannel(path, CREATE, WRITE)) {
218218
return write(channel, buffer, length);
219219
}

src/main/java/io/appulse/utils/threads/FutureUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public final class FutureUtils {
4242
* @return completed exceptionally {@link CompletableFuture} instance.
4343
*/
4444
public static <T> CompletableFuture<T> completedExceptionally (Throwable throwable) {
45-
val future = new CompletableFuture<T>();
45+
CompletableFuture<T> future = new CompletableFuture<>();
4646
future.completeExceptionally(throwable);
4747
return future;
4848
}
@@ -84,7 +84,7 @@ public static <T> CompletableFuture<T> toCompletableFuture (@NonNull Future<T> f
8484

8585
// https://stackoverflow.com/a/34163913
8686
private static <T> CompletableFuture<T> firstCompletedWithoutException (Stream<? extends CompletionStage<? extends T>> stream) {
87-
val result = new CompletableFuture<T>();
87+
CompletableFuture<T> result = new CompletableFuture<>();
8888
val complete = (Consumer<T>) result::complete;
8989

9090
val futures = stream

0 commit comments

Comments
 (0)