Skip to content

Commit 016b28f

Browse files
Merge pull request #972 from fbacchella/api_33
API 33
2 parents 22855d7 + aa3aad3 commit 016b28f

File tree

4 files changed

+6
-103
lines changed

4 files changed

+6
-103
lines changed

.circleci/config.yml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -108,43 +108,6 @@ jobs:
108108
- store_test_results:
109109
path: target/surefire-reports
110110
#don't persist_to_workspace, can't be done in parallel with testsj13
111-
testsj8:
112-
docker:
113-
- image: cimg/openjdk:8.0
114-
steps:
115-
- attach_workspace:
116-
at: /tmp/ws
117-
- run:
118-
command: |
119-
mv -n /tmp/ws/home/circleci/.m2 /home/circleci/
120-
mv -n /tmp/ws/home/circleci/.sonar /home/circleci/
121-
mv -n /tmp/ws/home/circleci/project/* /home/circleci/project/
122-
mv -n /tmp/ws/home/circleci/project/.??* /home/circleci/project/
123-
- run:
124-
command: |
125-
mvn -B test -Pskip -Darg.line="-Xmx2048m" -Djava.io.tmpdir="/tmp/$CIRCLE_JOB" -s .circleci/settings.xml
126-
environment:
127-
MAVEN_OPTS: "-Xmx512m"
128-
- store_test_results:
129-
path: target/surefire-reports
130-
#don't persist_to_workspace, can't be done in parallel with testsj13
131-
testsandroid:
132-
docker:
133-
- image: cimg/openjdk:21.0
134-
steps:
135-
- attach_workspace:
136-
at: /tmp/ws
137-
- run:
138-
command: |
139-
mv -n /tmp/ws/home/circleci/.m2 /home/circleci/
140-
mv -n /tmp/ws/home/circleci/.sonar /home/circleci/
141-
mv -n /tmp/ws/home/circleci/project/* /home/circleci/project/
142-
mv -n /tmp/ws/home/circleci/project/.??* /home/circleci/project/
143-
- run:
144-
command: |
145-
mvn -B test -Pskip,android -Darg.line="-Xmx2048m" -s .circleci/settings.xml -Dmaven.test.skip=true
146-
environment:
147-
MAVEN_OPTS: "-Xmx2048m"
148111
publish:
149112
docker:
150113
- image: cimg/openjdk:21.0
@@ -206,9 +169,6 @@ workflows:
206169
- build:
207170
requires:
208171
- checkout
209-
- testsj8:
210-
requires:
211-
- build
212172
- testsj11:
213173
requires:
214174
- build
@@ -218,16 +178,11 @@ workflows:
218178
- testsj21:
219179
requires:
220180
- build
221-
- testsandroid:
222-
requires:
223-
- build
224181
- publish:
225182
requires:
226-
- testsj8
227183
- testsj11
228184
- testsj17
229185
- testsj21
230-
- testsandroid
231186
- savecache:
232187
requires:
233188
- publish

pom.xml

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<!-- Required by reproducible builds: https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
4646
<project.build.outputTimestamp>0</project.build.outputTimestamp>
4747
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
48-
<jdk.target>8</jdk.target>
48+
<maven.compiler.release>11</maven.compiler.release>
4949
<!-- Indirection needed to keep optional jacoco settings and external argument lines-->
5050
<arg.line />
5151
<argLine>${arg.line}</argLine>
@@ -153,7 +153,7 @@
153153
<version>3.4.1</version>
154154
<configuration>
155155
<detectJavaApiLink>true</detectJavaApiLink>
156-
<source>${maven.compiler.source}</source>
156+
<source>${maven.compiler.release}</source>
157157
<tags>
158158
<tag>
159159
<name>api.note</name>
@@ -250,11 +250,6 @@
250250
</dependency>
251251
</dependencies>
252252
</plugin>
253-
<plugin>
254-
<groupId>org.codehaus.mojo</groupId>
255-
<artifactId>animal-sniffer-maven-plugin</artifactId>
256-
<version>1.22</version>
257-
</plugin>
258253
<plugin>
259254
<groupId>org.codehaus.mojo</groupId>
260255
<artifactId>versions-maven-plugin</artifactId>
@@ -292,25 +287,6 @@
292287
</plugins>
293288
</reporting>
294289
<profiles>
295-
<profile>
296-
<id>jdk8</id>
297-
<activation>
298-
<jdk>1.8</jdk>
299-
</activation>
300-
<properties>
301-
<maven.compiler.source>${jdk.target}</maven.compiler.source>
302-
<maven.compiler.target>${jdk.target}</maven.compiler.target>
303-
</properties>
304-
</profile>
305-
<profile>
306-
<id>jdk9+</id>
307-
<activation>
308-
<jdk>(1.8,)</jdk>
309-
</activation>
310-
<properties>
311-
<maven.compiler.release>${jdk.target}</maven.compiler.release>
312-
</properties>
313-
</profile>
314290
<profile>
315291
<!-- Used with the phase 'site' to check plugins and dependency versions -->
316292
<id>versions</id>
@@ -409,28 +385,5 @@
409385
</plugins>
410386
</build>
411387
</profile>
412-
<profile>
413-
<id>android</id>
414-
<build>
415-
<plugins>
416-
<plugin>
417-
<groupId>org.codehaus.mojo</groupId>
418-
<artifactId>animal-sniffer-maven-plugin</artifactId>
419-
<configuration>
420-
<signature>net.sf.androidscents.signature:android-api-level-28:9_r6</signature>
421-
</configuration>
422-
<executions>
423-
<execution>
424-
<id>test</id>
425-
<phase>test</phase>
426-
<goals>
427-
<goal>check</goal>
428-
</goals>
429-
</execution>
430-
</executions>
431-
</plugin>
432-
</plugins>
433-
</build>
434-
</profile>
435388
</profiles>
436389
</project>

src/main/java/zmq/io/mechanism/curve/CurveServerMechanism.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static zmq.io.Metadata.SOCKET_TYPE;
55

66
import java.nio.ByteBuffer;
7+
import java.util.Objects;
78

89
import zmq.Msg;
910
import zmq.Options;
@@ -510,12 +511,7 @@ private int produceError(Msg msg)
510511
assert (statusCode == null || statusCode.length() == 3);
511512

512513
msg.putShortString("ERROR");
513-
if (statusCode != null) {
514-
msg.putShortString(statusCode);
515-
}
516-
else {
517-
msg.putShortString("");
518-
}
514+
msg.putShortString(Objects.requireNonNullElse(statusCode, ""));
519515

520516
return 0;
521517
}

src/test/java/guide/clone.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.HashMap;
44
import java.util.Map;
5+
import java.util.Objects;
56

67
import org.zeromq.*;
78
import org.zeromq.ZMQ.Poller;
@@ -206,9 +207,7 @@ else if (command.equals("CONNECT")) {
206207
else if (command.equals("GET")) {
207208
String key = msg.popString();
208209
String value = kvmap.get(key);
209-
if (value != null)
210-
pipe.send(value);
211-
else pipe.send("");
210+
pipe.send(Objects.requireNonNullElse(value, ""));
212211
}
213212
msg.destroy();
214213

0 commit comments

Comments
 (0)