Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,43 +108,6 @@ jobs:
- store_test_results:
path: target/surefire-reports
#don't persist_to_workspace, can't be done in parallel with testsj13
testsj8:
docker:
- image: cimg/openjdk:8.0
steps:
- attach_workspace:
at: /tmp/ws
- run:
command: |
mv -n /tmp/ws/home/circleci/.m2 /home/circleci/
mv -n /tmp/ws/home/circleci/.sonar /home/circleci/
mv -n /tmp/ws/home/circleci/project/* /home/circleci/project/
mv -n /tmp/ws/home/circleci/project/.??* /home/circleci/project/
- run:
command: |
mvn -B test -Pskip -Darg.line="-Xmx2048m" -Djava.io.tmpdir="/tmp/$CIRCLE_JOB" -s .circleci/settings.xml
environment:
MAVEN_OPTS: "-Xmx512m"
- store_test_results:
path: target/surefire-reports
#don't persist_to_workspace, can't be done in parallel with testsj13
testsandroid:
docker:
- image: cimg/openjdk:21.0
steps:
- attach_workspace:
at: /tmp/ws
- run:
command: |
mv -n /tmp/ws/home/circleci/.m2 /home/circleci/
mv -n /tmp/ws/home/circleci/.sonar /home/circleci/
mv -n /tmp/ws/home/circleci/project/* /home/circleci/project/
mv -n /tmp/ws/home/circleci/project/.??* /home/circleci/project/
- run:
command: |
mvn -B test -Pskip,android -Darg.line="-Xmx2048m" -s .circleci/settings.xml -Dmaven.test.skip=true
environment:
MAVEN_OPTS: "-Xmx2048m"
publish:
docker:
- image: cimg/openjdk:21.0
Expand Down Expand Up @@ -206,9 +169,6 @@ workflows:
- build:
requires:
- checkout
- testsj8:
requires:
- build
- testsj11:
requires:
- build
Expand All @@ -218,16 +178,11 @@ workflows:
- testsj21:
requires:
- build
- testsandroid:
requires:
- build
- publish:
requires:
- testsj8
- testsj11
- testsj17
- testsj21
- testsandroid
- savecache:
requires:
- publish
51 changes: 2 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<!-- Required by reproducible builds: https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
<project.build.outputTimestamp>0</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.target>8</jdk.target>
<maven.compiler.release>11</maven.compiler.release>
<!-- Indirection needed to keep optional jacoco settings and external argument lines-->
<arg.line />
<argLine>${arg.line}</argLine>
Expand Down Expand Up @@ -153,7 +153,7 @@
<version>3.4.1</version>
<configuration>
<detectJavaApiLink>true</detectJavaApiLink>
<source>${maven.compiler.source}</source>
<source>${maven.compiler.release}</source>
<tags>
<tag>
<name>api.note</name>
Expand Down Expand Up @@ -250,11 +250,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.22</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
Expand Down Expand Up @@ -292,25 +287,6 @@
</plugins>
</reporting>
<profiles>
<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>${jdk.target}</maven.compiler.source>
<maven.compiler.target>${jdk.target}</maven.compiler.target>
</properties>
</profile>
<profile>
<id>jdk9+</id>
<activation>
<jdk>(1.8,)</jdk>
</activation>
<properties>
<maven.compiler.release>${jdk.target}</maven.compiler.release>
</properties>
</profile>
<profile>
<!-- Used with the phase 'site' to check plugins and dependency versions -->
<id>versions</id>
Expand Down Expand Up @@ -409,28 +385,5 @@
</plugins>
</build>
</profile>
<profile>
<id>android</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<signature>net.sf.androidscents.signature:android-api-level-28:9_r6</signature>
</configuration>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static zmq.io.Metadata.SOCKET_TYPE;

import java.nio.ByteBuffer;
import java.util.Objects;

import zmq.Msg;
import zmq.Options;
Expand Down Expand Up @@ -510,12 +511,7 @@ private int produceError(Msg msg)
assert (statusCode == null || statusCode.length() == 3);

msg.putShortString("ERROR");
if (statusCode != null) {
msg.putShortString(statusCode);
}
else {
msg.putShortString("");
}
msg.putShortString(Objects.requireNonNullElse(statusCode, ""));

return 0;
}
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/guide/clone.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import org.zeromq.*;
import org.zeromq.ZMQ.Poller;
Expand Down Expand Up @@ -206,9 +207,7 @@ else if (command.equals("CONNECT")) {
else if (command.equals("GET")) {
String key = msg.popString();
String value = kvmap.get(key);
if (value != null)
pipe.send(value);
else pipe.send("");
pipe.send(Objects.requireNonNullElse(value, ""));
}
msg.destroy();

Expand Down