From d71839cc72b0478463b021f4a700b1d3cdd94fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 27 Oct 2022 12:59:44 +0200 Subject: [PATCH 001/768] Set version to 2.7.0-SNAPSHOT --- junixsocket-codecoverage/pom.xml | 2 +- junixsocket-common/pom.xml | 2 +- junixsocket-core/pom.xml | 2 +- junixsocket-demo/pom.xml | 2 +- junixsocket-dist/pom.xml | 2 +- junixsocket-jetty/pom.xml | 2 +- junixsocket-mysql/pom.xml | 2 +- junixsocket-native-common/pom.xml | 2 +- junixsocket-native-cross/pom.xml | 2 +- junixsocket-native-custom/pom.xml | 2 +- junixsocket-native/pom.xml | 2 +- junixsocket-rmi/pom.xml | 2 +- junixsocket-selftest-native-image/pom.xml | 2 +- junixsocket-selftest/pom.xml | 2 +- junixsocket-server/pom.xml | 2 +- junixsocket-tipc/pom.xml | 2 +- junixsocket-vsock/pom.xml | 2 +- pom.xml | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/junixsocket-codecoverage/pom.xml b/junixsocket-codecoverage/pom.xml index 20ba3ea87..ae070b4e6 100644 --- a/junixsocket-codecoverage/pom.xml +++ b/junixsocket-codecoverage/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-codecoverage diff --git a/junixsocket-common/pom.xml b/junixsocket-common/pom.xml index 7d4bd1784..7cdb114de 100644 --- a/junixsocket-common/pom.xml +++ b/junixsocket-common/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-common diff --git a/junixsocket-core/pom.xml b/junixsocket-core/pom.xml index e588428e0..d10b3ac0b 100644 --- a/junixsocket-core/pom.xml +++ b/junixsocket-core/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-core diff --git a/junixsocket-demo/pom.xml b/junixsocket-demo/pom.xml index 5f2b50659..7c802337f 100644 --- a/junixsocket-demo/pom.xml +++ b/junixsocket-demo/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-demo diff --git a/junixsocket-dist/pom.xml b/junixsocket-dist/pom.xml index 941f9937a..d6b4b1a77 100644 --- a/junixsocket-dist/pom.xml +++ b/junixsocket-dist/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-dist diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml index be05bc148..cacdf253f 100644 --- a/junixsocket-jetty/pom.xml +++ b/junixsocket-jetty/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-jetty diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index bacd7f4a3..7bd90b3e9 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-mysql diff --git a/junixsocket-native-common/pom.xml b/junixsocket-native-common/pom.xml index 49bf4aaaf..5ef4da19c 100644 --- a/junixsocket-native-common/pom.xml +++ b/junixsocket-native-common/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native-common diff --git a/junixsocket-native-cross/pom.xml b/junixsocket-native-cross/pom.xml index ed872173b..ad7a5fd02 100644 --- a/junixsocket-native-cross/pom.xml +++ b/junixsocket-native-cross/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native-cross diff --git a/junixsocket-native-custom/pom.xml b/junixsocket-native-custom/pom.xml index 10683e3ac..34bcf024c 100644 --- a/junixsocket-native-custom/pom.xml +++ b/junixsocket-native-custom/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native-custom diff --git a/junixsocket-native/pom.xml b/junixsocket-native/pom.xml index f0b74ba94..149f59193 100644 --- a/junixsocket-native/pom.xml +++ b/junixsocket-native/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native diff --git a/junixsocket-rmi/pom.xml b/junixsocket-rmi/pom.xml index 3e2d19a0d..cb9899c4c 100644 --- a/junixsocket-rmi/pom.xml +++ b/junixsocket-rmi/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-rmi diff --git a/junixsocket-selftest-native-image/pom.xml b/junixsocket-selftest-native-image/pom.xml index 9effeca11..f11360b84 100644 --- a/junixsocket-selftest-native-image/pom.xml +++ b/junixsocket-selftest-native-image/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-selftest-native-image diff --git a/junixsocket-selftest/pom.xml b/junixsocket-selftest/pom.xml index 1ebdc63e3..f213aa89c 100644 --- a/junixsocket-selftest/pom.xml +++ b/junixsocket-selftest/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-selftest diff --git a/junixsocket-server/pom.xml b/junixsocket-server/pom.xml index 3fa2869b7..4e2fa1bf6 100644 --- a/junixsocket-server/pom.xml +++ b/junixsocket-server/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-server diff --git a/junixsocket-tipc/pom.xml b/junixsocket-tipc/pom.xml index 2f7946ecc..091374954 100644 --- a/junixsocket-tipc/pom.xml +++ b/junixsocket-tipc/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-tipc diff --git a/junixsocket-vsock/pom.xml b/junixsocket-vsock/pom.xml index 0099ae28b..8590d5e27 100644 --- a/junixsocket-vsock/pom.xml +++ b/junixsocket-vsock/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT ../pom.xml junixsocket-vsock diff --git a/pom.xml b/pom.xml index 2e8799cc9..499e38338 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.kohlschutter.junixsocket junixsocket - 2.6.1 + 2.7.0-SNAPSHOT pom com.kohlschutter From 6ad7ded7db93ae981a08b4e07138a9e2203ae22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 27 Oct 2022 13:40:26 +0200 Subject: [PATCH 002/768] Undo CodeQL split It's not worth it. Also, enable -Pstrict, so we catch PMD/checkstyle etc. errors early --- .github/workflows/codeql-analysis-c.yml | 60 ------------------- ...-analysis-java.yml => codeql-analysis.yml} | 8 +-- 2 files changed, 4 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/codeql-analysis-c.yml rename .github/workflows/{codeql-analysis-java.yml => codeql-analysis.yml} (94%) diff --git a/.github/workflows/codeql-analysis-c.yml b/.github/workflows/codeql-analysis-c.yml deleted file mode 100644 index a5e642ac9..000000000 --- a/.github/workflows/codeql-analysis-c.yml +++ /dev/null @@ -1,60 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL C" - -on: - push: - branches: [ "main", "dev", "wip" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "main", "dev", "wip" ] - schedule: - - cron: '39 16 * * 3' - -jobs: - analyze: - name: Analyze C - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: true - matrix: - language: [ 'cpp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - run: | - echo "Build junixsocket-native with Maven (no tests)" - mvn clean install -Pcodeql -pl junixsocket-native -Dignorant - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/codeql-analysis-java.yml b/.github/workflows/codeql-analysis.yml similarity index 94% rename from .github/workflows/codeql-analysis-java.yml rename to .github/workflows/codeql-analysis.yml index 94cee34e2..d6ebdbc41 100644 --- a/.github/workflows/codeql-analysis-java.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,7 +9,7 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL Java" +name: "CodeQL" on: push: @@ -22,7 +22,7 @@ on: jobs: analyze: - name: Analyze Java + name: Analyze runs-on: ubuntu-latest permissions: actions: read @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: true matrix: - language: [ 'java' ] + language: [ 'cpp', 'java' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support @@ -54,7 +54,7 @@ jobs: - run: | echo "Build junixsocket with Maven (no tests)" - mvn clean install -Pcodeql -Pcodeql-skip-c + mvn clean install -Pcodeql -Pstrict - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 75bef9600aafa64420932e89dcf87a71446c82c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 27 Oct 2022 14:08:14 +0200 Subject: [PATCH 003/768] Update script to find GraalVM --- junixsocket-native-graalvm/bin/graalvm | 11 ------ junixsocket-native-graalvm/bin/with-graalvm | 40 +++++++++++++++++++++ src/site/markdown/release.md | 25 ++++++++----- 3 files changed, 57 insertions(+), 19 deletions(-) delete mode 100755 junixsocket-native-graalvm/bin/graalvm create mode 100755 junixsocket-native-graalvm/bin/with-graalvm diff --git a/junixsocket-native-graalvm/bin/graalvm b/junixsocket-native-graalvm/bin/graalvm deleted file mode 100755 index d06e042bd..000000000 --- a/junixsocket-native-graalvm/bin/graalvm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -java -version 2>&1 | grep -q GraalVM -if [[ $? -eq 0 ]]; then - exec $@ -fi - -# FIXME auto-detect -export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.2.0/Contents/Home -export PATH=$JAVA_HOME/bin:$PATH -exec $@ diff --git a/junixsocket-native-graalvm/bin/with-graalvm b/junixsocket-native-graalvm/bin/with-graalvm new file mode 100755 index 000000000..4f5389a26 --- /dev/null +++ b/junixsocket-native-graalvm/bin/with-graalvm @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# junixsocket +# Copyright 2009-2022 Christian Kohlschütter +# SPDX-License-Identifier: Apache-2.0 +# +# Script to detect and enable GraalVM. +# +# When run without arguments, an eval-able string like "GRAALVM_HOME=/path/to/graalvm" is emitted. +# Otherwise, the arguments are executed with the determined GraalVM in path (GRAALVM_HOME, JAVA_HOME and PATH set accordingly). +# +java -version 2>&1 | grep -q GraalVM +if [[ $? -eq 0 ]]; then + exec $@ +fi + +if [[ -z "$GRAALVM_HOME" ]]; then + for d in $(find /Library/Java/JavaVirtualMachines /usr/lib/jvm -maxdepth 1 -type d -name "*graalvm*" 2>/dev/null | sort -r); do + if [[ -e "$d/bin/java" ]]; then + export GRAALVM_HOME="$d" + break + elif [[ -e "$d/Contents/Home/bin/java" ]]; then + export GRAALVM_HOME="$d/Contents/Home" + break + fi + done +fi + +if [[ -z "$GRAALVM_HOME" ]]; then + echo "Error: Could not determine GRAALVM_HOME -- Please set manually" >&2 + exit 1 +else + if [[ $# -eq 0 ]]; then + echo "GRAALVM_HOME=$GRAALVM_HOME" + fi +fi + +export JAVA_HOME="$GRAALVM_HOME" +export PATH=$JAVA_HOME/bin:$PATH +exec -- $@ diff --git a/src/site/markdown/release.md b/src/site/markdown/release.md index 3cf3738bd..8bfabb7bc 100644 --- a/src/site/markdown/release.md +++ b/src/site/markdown/release.md @@ -31,7 +31,8 @@ Instructions for macOS * Enable pinentry-mac - This gives a nice GUI for the passphrase, and allows us to store the GPG key passphrase in the macOS keychain) + This gives a nice GUI for the passphrase, and allows us to store the GPG key passphrase in the + macOS keychain) * Open or create `~/.gnupg/gpg-agent.conf` then add the following line if it doesn't exist yet: @@ -51,16 +52,19 @@ Instructions for macOS ### Build environment for other platforms Currently, the easiest way to build for other platforms is to have a working Java 9 (or later) -environment, Maven 3+ and the junixsocket project ready. Just spin up a virtual machine (or emulator), -install Java, Maven and junixsocket, and you should be good to go. +environment, Maven 3+ and the junixsocket project ready. Just spin up a virtual machine (or +emulator), install Java, Maven and junixsocket, and you should be good to go. ## Common tasks ### Update changelog, website, README.md -Update `junixsocket/src/site/markdown/changelog.md` with a section for the new version and all noteworthy changes. +Update `junixsocket/src/site/markdown/changelog.md` with a section for the new version and all +noteworthy changes. -Check all mentions (execpet for `changelog.md`) of the current junixsocket under `junixsocket/src/site/markdown`, and replace accordingly: `grep X.Y.Z src/site/markdown/* | grep -v changelog.md:` +Check all mentions (execpet for `changelog.md`) of the current junixsocket under +`junixsocket/src/site/markdown`, and replace accordingly: +`grep X.Y.Z src/site/markdown/* | grep -v changelog.md:` Also update the dependency statement in `junixsocket/README.md`. @@ -68,9 +72,12 @@ Also update the dependency statement in `junixsocket/README.md`. ### Ensure GraalVM native configs are still up-to-date -Run `junixsocket-native-graalvm/bin/graalvm junixsocket-native-graalvm/bin/build-selftest` +Run `junixsocket-native-graalvm/bin/with-graalvm junixsocket-native-graalvm/bin/build-selftest` -If, at the end, you see changes to the json files in `junixsocket-native-graalvm/output`, review them, modify the json files in `junixsocket-{common,tipc,vsock,selftest,...}/src/main/resources/META-INF/native-image` accordingly, and add/commit both sets of changes. +If, at the end, you see changes to the json files in `junixsocket-native-graalvm/output`, review +them, modify the json files in +`junixsocket-{common,tipc,vsock,selftest,...}/src/main/resources/META-INF/native-image` accordingly, +and add/commit both sets of changes. ### Ensure the code is properly formatted and licenses are in place @@ -139,7 +146,9 @@ Also run the selftest with Java 8, e.g.: /Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java -jar junixsocket-selftest/target/junixsocket-selftest-2.6.1-jar-with-dependencies.jar -Run `junixsocket-native-graalvm/bin/graalvm mvn package -pl junixsocket-selftest-native-image -Pnative` (on all native-image supported platforms) to build the GraalVM native-image. Test the native-image by running `junixsocket-selftest-native-image/target/junixsocket-selftest-native-image-X.Y.Z`. +Run `junixsocket-native-graalvm/bin/with-graalvm mvn package -pl junixsocket-selftest-native-image -Pnative` +(on all native-image supported platforms) to build the GraalVM native-image. Test the native-image +by running `junixsocket-selftest-native-image/target/junixsocket-selftest-native-image-X.Y.Z`. > **NOTE:** (Replace X.Y.Z with the actual version) From 521d4fb496944066e07953431f66e944983503b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 27 Oct 2022 14:54:56 +0200 Subject: [PATCH 004/768] Add z/TPF to the list of additional, currently unsupported platforms --- src/site/markdown/compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index 45e0d896f..264fe86b7 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -76,7 +76,7 @@ Please reach out if you have some feature in mind that may be supported on these ## Additional Platforms and Architectures Upon request, support for additional systems, platforms and architectures may be added, -such as OpenVMS, FUJITSU BS2000/OSD, Unisys ClearPath OS 2200, QNX, VxWorks, HP-UX, Haiku, etc. +such as IBM z/TPF, OpenVMS, FUJITSU BS2000/OSD, Unisys ClearPath OS 2200, QNX, VxWorks, HP-UX, Haiku, etc. If you are interested in using junixsocket on another platform, or willing to sponsor development (by providing access to such platforms, covering licensing costs, etc.), feel free to From 674fd5ddcdf0c3c159d39b642201b801a109838d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 27 Oct 2022 20:47:47 +0200 Subject: [PATCH 005/768] test: ServerThread: Wait until Thread is ready On very slow systems (such as qemu s390), unit tests using ServerThread may erroneously time out. Add a semaphore that blocks until the server thread is ready. --- .../test/java/org/newsclub/net/unix/AcceptTimeoutTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/ReadWriteTest.java | 4 ++-- .../test/java/org/newsclub/net/unix/SocketTestBase.java | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java index 58f14c1a0..4dddd1c3d 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java @@ -144,7 +144,7 @@ public void run() { } System.out.println("SocketTimeout, trying connect again (" + i + ")"); - e.printStackTrace(); + // e.printStackTrace(); continue; } catch (TestAbortedWithImportantMessageException e) { runtimeExceptionCF.complete(e); diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java index f18a685aa..35ec287a9 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java @@ -90,7 +90,7 @@ public void testReceiveDataByteForByteSendByteForByte() { } private final class ByteArrayWritingServerThread extends ServerThread { - public ByteArrayWritingServerThread() throws IOException { + public ByteArrayWritingServerThread() throws IOException, InterruptedException { super(); } @@ -110,7 +110,7 @@ protected void handleConnection(final Socket sock) throws IOException { } private final class ByteForByteWritingServerThread extends ServerThread { - public ByteForByteWritingServerThread() throws IOException { + public ByteForByteWritingServerThread() throws IOException, InterruptedException { super(); } diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java index 3fbf715fe..df703241b 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java @@ -164,14 +164,16 @@ protected abstract class ServerThread extends Thread implements AutoCloseable { private volatile Error error = null; private final AtomicBoolean loop = new AtomicBoolean(true); private final Semaphore sema = new Semaphore(1); + private final Semaphore readySema = new Semaphore(0); @SuppressFBWarnings("SC_START_IN_CTOR") - protected ServerThread() throws IOException { + protected ServerThread() throws IOException, InterruptedException { super(); serverSocket = startServer(); // NOPMD setDaemon(true); start(); + readySema.acquire(); } protected ServerSocket startServer() throws IOException { @@ -299,6 +301,7 @@ protected void acceptAndHandleConnection() throws IOException { public final void run() { try { loop.set(true); + readySema.release(); onServerReady(); while (loop.get()) { acceptAndHandleConnection(); @@ -343,7 +346,7 @@ public void checkException() throws Exception { } protected abstract class AFUNIXServerThread extends ServerThread { - protected AFUNIXServerThread() throws IOException { + protected AFUNIXServerThread() throws IOException, InterruptedException { super(); } From 4556a18999240c51167dcbb21d81b87cc26fb4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 13 Nov 2022 00:39:41 +0100 Subject: [PATCH 006/768] Code cleanup --- .../src/main/java/org/newsclub/net/unix/FileDescriptorCast.java | 1 - .../src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java | 1 - 2 files changed, 2 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java index e77caa507..993634cff 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java @@ -108,7 +108,6 @@ public WritableByteChannel provideAs(FileDescriptorCast fdc, } }); addProvider(ReadableByteChannel.class, new CastingProvider() { - @SuppressWarnings("resource") @Override public ReadableByteChannel provideAs(FileDescriptorCast fdc, Class desiredType) throws IOException { diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java index 13d325c5e..c6d32d643 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java @@ -42,7 +42,6 @@ public final class AFVSOCKSocket extends AFSocket implemen super(new AFVSOCKSocketImpl(fdObj), factory); } - @SuppressWarnings("unused") private static synchronized AFVSOCKSocketImplExtensions getStaticImplExtensions() throws IOException { if (staticExtensions == null) { From 813ed8e63faa53d2eb1ca88efd83553bec2e7f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 13 Nov 2022 00:40:07 +0100 Subject: [PATCH 007/768] Add Socket connectors for AF_VSOCK, Firecracker --- .../net/unix/AFServerSocketConnector.java | 41 +++++ .../newsclub/net/unix/AFSocketConnector.java | 40 +++++ .../AFVSOCKProxyServerSocketConnector.java | 94 ++++++++++++ .../vsock/AFVSOCKProxySocketConnector.java | 145 ++++++++++++++++++ 4 files changed, 320 insertions(+) create mode 100644 junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java create mode 100644 junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java create mode 100644 junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java create mode 100644 junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java new file mode 100644 index 000000000..9946b31f1 --- /dev/null +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java @@ -0,0 +1,41 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.newsclub.net.unix; + +import java.io.IOException; + +/** + * Some connector that is able to create {@link AFServerSocket}s bound to a given + * {@link AFSocketAddress}. + * + * @param The address type to bind to. + * @param The address type for the returned server socket (which should either be identical to + * {@code A} or {@link AFSocketAddress} to indicate that this could be any socket). + * @author Christian Kohlschütter + * @see AFSocketConnector + */ +public interface AFServerSocketConnector { + /** + * Creates an {@link AFServerSocket} bound to the given address. + * + * @param addr The address to bind to. + * @return The bound socket. + * @throws IOException on error. + */ + AFServerSocket bind(A addr) throws IOException; +} diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java new file mode 100644 index 000000000..999e23a79 --- /dev/null +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java @@ -0,0 +1,40 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.newsclub.net.unix; + +import java.io.IOException; + +/** + * Some connector that is able to connect to a given {@link AFSocketAddress}. + * + * @param The address type to connect to. + * @param The address type for the returned socket (which should either be identical to + * {@code A} or {@link AFSocketAddress} to indicate that this could be any socket). + * @author Christian Kohlschütter + * @see AFServerSocketConnector + */ +public interface AFSocketConnector { + /** + * Connect to the socket at the given address. + * + * @param addr The address to connect to. + * @return The connected socket. + * @throws IOException on error. + */ + AFSocket connect(A addr) throws IOException; +} diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java new file mode 100644 index 000000000..5c15c146b --- /dev/null +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java @@ -0,0 +1,94 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.newsclub.net.unix.vsock; + +import java.io.File; +import java.io.IOException; + +import org.newsclub.net.unix.AFServerSocket; +import org.newsclub.net.unix.AFServerSocketConnector; +import org.newsclub.net.unix.AFSocketAddress; +import org.newsclub.net.unix.AFUNIXSocketAddress; +import org.newsclub.net.unix.AFVSOCKSocketAddress; +import org.newsclub.net.unix.AddressUnavailableSocketException; + +/** + * Provides access to AF_VSOCK connections that aren't directly accessible but exposed via a + * proxying/multiplexing Unix domain socket. + * + * @author Christian Kohlschütter + * @see #openFirecrackerStyleConnector(File, int) + * @see #openDirectConnector() + */ +public final class AFVSOCKProxyServerSocketConnector implements + AFServerSocketConnector { + private static final AFServerSocketConnector DIRECT_CONNECTOR = + new AFServerSocketConnector() { + + @Override + public AFServerSocket bind(AFVSOCKSocketAddress addr) + throws IOException { + return addr.newForceBoundServerSocket(); + } + }; + + private final String listenAddressPrefix; + private final int allowedCID; + + private AFVSOCKProxyServerSocketConnector(String listenAddressPrefix, int allowedCID) { + this.listenAddressPrefix = listenAddressPrefix; + this.allowedCID = allowedCID; + } + + /** + * Returns an instance that is configured to support + * [Firecracker-style](https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md) + * Unix domain sockets. + * + * @param listenAddressPrefix The prefix of any listening socket. The actual socket will have + * _vsockPort appended to it (with {@code vsockPort} being replaced + * by the corresponding port number). + * @param allowedCID The permitted CID, or {@link AFVSOCKSocketAddress#VMADDR_CID_ANY} for "any". + * @return The instance. + */ + public static AFServerSocketConnector openFirecrackerStyleConnector( + File listenAddressPrefix, int allowedCID) { + return new AFVSOCKProxyServerSocketConnector(listenAddressPrefix.getAbsolutePath(), allowedCID); + } + + /** + * Returns an instance that is configured to connect directly to the given address. + * + * @return The direct instance. + */ + public static AFServerSocketConnector openDirectConnector() { + return DIRECT_CONNECTOR; + } + + @Override + public AFServerSocket bind(AFVSOCKSocketAddress addr) throws IOException { + int cid = addr.getVSOCKCID(); + if (cid != allowedCID && cid != AFVSOCKSocketAddress.VMADDR_CID_ANY + && allowedCID != AFVSOCKSocketAddress.VMADDR_CID_ANY) { + throw new AddressUnavailableSocketException("Factory does not cover CID " + cid); + } + + return AFUNIXSocketAddress.of(new File(listenAddressPrefix + "_" + addr.getVSOCKPort())) + .newForceBoundServerSocket(); + } +} diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java new file mode 100644 index 000000000..7fec34707 --- /dev/null +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java @@ -0,0 +1,145 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.newsclub.net.unix.vsock; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.SocketException; +import java.nio.charset.StandardCharsets; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.newsclub.net.unix.AFSocket; +import org.newsclub.net.unix.AFSocketAddress; +import org.newsclub.net.unix.AFSocketConnector; +import org.newsclub.net.unix.AFUNIXSocket; +import org.newsclub.net.unix.AFUNIXSocketAddress; +import org.newsclub.net.unix.AFVSOCKSocketAddress; +import org.newsclub.net.unix.AddressUnavailableSocketException; + +/** + * Provides access to AF_VSOCK connections that aren't directly accessible but exposed via a + * proxying/multiplexing Unix domain socket. + * + * @author Christian Kohlschütter + * @see #openFirecrackerStyleConnector(AFUNIXSocketAddress, int) + * @see #openDirectConnector() + */ +public final class AFVSOCKProxySocketConnector implements + AFSocketConnector { + private static final AFSocketConnector DIRECT_CONNECTOR = + new AFSocketConnector() { + + @Override + public AFSocket connect(AFVSOCKSocketAddress addr) + throws IOException { + return addr.newConnectedSocket(); + } + }; + + private static final Pattern PAT_OK = Pattern.compile("OK ([0-9]+)"); + private static final byte[] OK = {'O', 'K', ' '}; + private final AFUNIXSocketAddress connectorAddress; + private final int allowedCID; + + private AFVSOCKProxySocketConnector(AFUNIXSocketAddress connectorAddress, int allowedCID) { + this.connectorAddress = connectorAddress; + this.allowedCID = allowedCID; + } + + /** + * Returns an instance that is configured to support + * [Firecracker-style](https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md) + * Unix domain sockets. + * + * @param connectorAddress The unix socket address pointing at the Firecracker-style multiplexing + * domain socket. + * @param allowedCID The permitted CID, or {@link AFVSOCKSocketAddress#VMADDR_CID_ANY} for "any". + * @return The instance. + */ + public static AFSocketConnector openFirecrackerStyleConnector( + AFUNIXSocketAddress connectorAddress, int allowedCID) { + return new AFVSOCKProxySocketConnector(connectorAddress, allowedCID); + } + + /** + * Returns an instance that is configured to connect directly to the given address. + * + * @return The direct instance. + */ + public static AFSocketConnector openDirectConnector() { + return DIRECT_CONNECTOR; + } + + /** + * Connects to the given AF_VSOCK address. + * + * @param vsockAddress The address to connect to. + * @return The connected socket. + * @throws IOException on error. + * @throws AddressUnavailableSocketException if the CID is not covered by this connector. + */ + @Override + public AFSocket connect(AFVSOCKSocketAddress vsockAddress) throws IOException { + int cid = vsockAddress.getVSOCKCID(); + if (cid != allowedCID && cid != AFVSOCKSocketAddress.VMADDR_CID_ANY + && allowedCID != AFVSOCKSocketAddress.VMADDR_CID_ANY) { + throw new AddressUnavailableSocketException("Connector does not cover CID " + cid); + } + + @SuppressWarnings("resource") + AFUNIXSocket sock = connectorAddress.newConnectedSocket(); + InputStream in = sock.getInputStream(); + OutputStream out = sock.getOutputStream(); + + boolean success = false; + + try { // NOPMD.UseTryWithResources + String connectLine = "CONNECT " + vsockAddress.getVSOCKPort() + "\n"; + out.write(connectLine.getBytes(StandardCharsets.ISO_8859_1)); + + byte[] buf = new byte[16]; + int b; + int i = 0; + while ((b = in.read()) != -1 && b != '\n' && i < buf.length) { + buf[i] = (byte) b; + if (i < 3) { + if (OK[i] != b) { + break; + } + } + i++; + } + if (b == '\n' && i > 3) { + Matcher m = PAT_OK.matcher(new String(buf, 0, i, StandardCharsets.ISO_8859_1)); + if (m.matches()) { + /* int hostPort = */ Integer.parseInt(m.group(1)); + success = true; + } + } + } finally { // NOPMD.DoNotThrowExceptionInFinally + if (!success) { + sock.close(); + throw new SocketException("Unexpected response from proxy socket"); + } + } + + return sock; + } +} From 66c72ddcf9a9b706c856d697c561bb2b22469bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 13 Nov 2022 18:10:49 +0100 Subject: [PATCH 008/768] Update dependencies Note that MySQL Connector/J since version 8.0.31 has the statement "requires mysql.connector.j" instead of "requires mysql.connector.java" --- junixsocket-dist/pom.xml | 2 +- junixsocket-mysql/pom.xml | 2 +- junixsocket-mysql/src/main/java/module-info.java | 3 ++- junixsocket-selftest-native-image/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/junixsocket-dist/pom.xml b/junixsocket-dist/pom.xml index d6b4b1a77..06d1bedea 100644 --- a/junixsocket-dist/pom.xml +++ b/junixsocket-dist/pom.xml @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.1.1 + 3.4.2 build-dist diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index 7bd90b3e9..2fc0abaf5 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -25,7 +25,7 @@ mysql mysql-connector-java - 8.0.30 + 8.0.31 provided diff --git a/junixsocket-mysql/src/main/java/module-info.java b/junixsocket-mysql/src/main/java/module-info.java index 300b929d6..494994200 100644 --- a/junixsocket-mysql/src/main/java/module-info.java +++ b/junixsocket-mysql/src/main/java/module-info.java @@ -8,7 +8,8 @@ requires java.sql; requires java.base; - requires mysql.connector.java; + // requires mysql.connector.java; // until 8.0.30 + requires mysql.connector.j; // from 8.0.31 requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; diff --git a/junixsocket-selftest-native-image/pom.xml b/junixsocket-selftest-native-image/pom.xml index f11360b84..e2763e1fd 100644 --- a/junixsocket-selftest-native-image/pom.xml +++ b/junixsocket-selftest-native-image/pom.xml @@ -51,7 +51,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.14 + 0.9.17 diff --git a/pom.xml b/pom.xml index 499e38338..bbc705a0e 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter kohlschutter-parent-multirelease - 1.5.1 + 1.5.2 ../kohlschutter-parent/kohlschutter-parent-multirelease/pom.xml junixsocket From 09406f4e4a1b175dfd3fe1ebac5b6d26f46070e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 13 Nov 2022 18:21:25 +0100 Subject: [PATCH 009/768] Use kohlschutter-parent 1.5.2-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bbc705a0e..0bb0903fc 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter kohlschutter-parent-multirelease - 1.5.2 + 1.5.2-SNAPSHOT ../kohlschutter-parent/kohlschutter-parent-multirelease/pom.xml junixsocket From d583a5e2f15ac786c4e2d2a9b6ef434f3924b4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 13 Nov 2022 18:21:51 +0100 Subject: [PATCH 010/768] mvn formatter:format --- .../newsclub/net/unix/AFAddressFamily.java | 20 ++--- .../net/unix/AFAddressFamilyConfig.java | 20 ++--- .../java/org/newsclub/net/unix/AFCore.java | 6 +- .../newsclub/net/unix/AFDatagramChannel.java | 16 ++-- .../newsclub/net/unix/AFDatagramSocket.java | 34 ++++----- .../net/unix/AFDatagramSocketImpl.java | 8 +- .../org/newsclub/net/unix/AFInetAddress.java | 16 ++-- .../org/newsclub/net/unix/AFInputStream.java | 2 +- .../org/newsclub/net/unix/AFOutputStream.java | 6 +- .../java/org/newsclub/net/unix/AFPipe.java | 4 +- .../newsclub/net/unix/AFSelectorProvider.java | 22 +++--- .../org/newsclub/net/unix/AFServerSocket.java | 52 ++++++------- .../net/unix/AFServerSocketChannel.java | 16 ++-- .../net/unix/AFServerSocketConnector.java | 2 +- .../java/org/newsclub/net/unix/AFSocket.java | 66 ++++++++--------- .../newsclub/net/unix/AFSocketAddress.java | 74 +++++++++---------- .../net/unix/AFSocketAddressConfig.java | 12 +-- .../net/unix/AFSocketAddressFromHostname.java | 6 +- .../newsclub/net/unix/AFSocketCapability.java | 20 ++--- .../newsclub/net/unix/AFSocketChannel.java | 12 +-- .../newsclub/net/unix/AFSocketConnector.java | 2 +- .../org/newsclub/net/unix/AFSocketCore.java | 2 +- .../newsclub/net/unix/AFSocketExtensions.java | 14 ++-- .../newsclub/net/unix/AFSocketFactory.java | 12 +-- .../org/newsclub/net/unix/AFSocketImpl.java | 16 ++-- .../net/unix/AFSocketImplExtensions.java | 2 +- .../org/newsclub/net/unix/AFSocketOption.java | 4 +- .../org/newsclub/net/unix/AFSocketPair.java | 10 +-- .../newsclub/net/unix/AFSocketProtocol.java | 2 +- .../org/newsclub/net/unix/AFSocketType.java | 4 +- .../org/newsclub/net/unix/AFSomeSocket.java | 6 +- .../net/unix/AFTIPCSocketAddress.java | 46 ++++++------ .../net/unix/AFTIPCSocketImplExtensions.java | 14 ++-- .../net/unix/AFUNIXDatagramChannel.java | 2 +- .../net/unix/AFUNIXDatagramSocket.java | 4 +- .../net/unix/AFUNIXProtocolFamily.java | 2 +- .../net/unix/AFUNIXSelectorProvider.java | 4 +- .../newsclub/net/unix/AFUNIXServerSocket.java | 20 ++--- .../net/unix/AFUNIXServerSocketChannel.java | 2 +- .../org/newsclub/net/unix/AFUNIXSocket.java | 24 +++--- .../net/unix/AFUNIXSocketAddress.java | 62 ++++++++-------- .../net/unix/AFUNIXSocketCapability.java | 8 +- .../net/unix/AFUNIXSocketChannel.java | 2 +- .../net/unix/AFUNIXSocketCredentials.java | 18 ++--- .../net/unix/AFUNIXSocketExtensions.java | 20 ++--- .../net/unix/AFUNIXSocketFactory.java | 22 +++--- .../newsclub/net/unix/AFUNIXSocketImpl.java | 2 +- .../newsclub/net/unix/AFUNIXSocketPair.java | 6 +- .../net/unix/AFVSOCKSocketAddress.java | 42 +++++------ .../net/unix/AFVSOCKSocketImplExtensions.java | 8 +- .../AddressUnavailableSocketException.java | 4 +- .../net/unix/BrokenPipeSocketException.java | 4 +- .../org/newsclub/net/unix/CleanableState.java | 6 +- .../org/newsclub/net/unix/CloseablePair.java | 10 +-- .../org/newsclub/net/unix/Closeables.java | 12 +-- .../net/unix/DatagramSocketImplShim.java | 2 +- .../net/unix/FileDescriptorAccess.java | 4 +- .../newsclub/net/unix/FileDescriptorCast.java | 32 ++++---- .../org/newsclub/net/unix/HostAndPort.java | 16 ++-- .../unix/InvalidArgumentSocketException.java | 4 +- .../net/unix/InvalidSocketException.java | 4 +- .../org/newsclub/net/unix/NamedInteger.java | 20 ++--- .../net/unix/NamedIntegerBitmask.java | 22 +++--- .../net/unix/NativeLibraryLoader.java | 2 +- .../newsclub/net/unix/NativeUnixSocket.java | 6 +- .../OperationNotSupportedSocketException.java | 4 +- .../newsclub/net/unix/RAFChannelProvider.java | 2 +- .../net/unix/SocketAddressFilter.java | 4 +- .../net/unix/SocketClosedException.java | 4 +- .../org/newsclub/net/unix/SocketImplShim.java | 2 +- .../net/unix/SocketOptionsMapper.java | 2 +- .../org/newsclub/net/unix/AFDatagramUtil.java | 2 +- .../newsclub/net/unix/AcceptTimeoutTest.java | 4 +- .../newsclub/net/unix/AddressSpecifics.java | 6 +- .../newsclub/net/unix/CancelAcceptTest.java | 4 +- .../org/newsclub/net/unix/EndOfFileTest.java | 6 +- .../org/newsclub/net/unix/FinalizeTest.java | 4 +- .../newsclub/net/unix/FinalizeTestClient.java | 4 +- .../java/org/newsclub/net/unix/PipeTest.java | 6 +- .../org/newsclub/net/unix/ReadWriteTest.java | 2 +- .../org/newsclub/net/unix/SelectorTest.java | 12 +-- .../net/unix/SelftestDiagnosticsHelper.java | 6 +- .../newsclub/net/unix/SelftestProvider.java | 2 +- .../newsclub/net/unix/ServerSocketTest.java | 2 +- .../org/newsclub/net/unix/SoTimeoutTest.java | 6 +- .../newsclub/net/unix/SocketChannelTest.java | 8 +- .../org/newsclub/net/unix/SocketTest.java | 2 +- .../org/newsclub/net/unix/SocketTestBase.java | 36 ++++----- .../net/unix/StandardSocketOptionsTest.java | 2 +- .../org/newsclub/net/unix/StdinSocketApp.java | 2 +- .../unix/domain/FileDescriptorCastTest.java | 2 +- .../net/unix/domain/FileDescriptorsTest.java | 2 +- .../net/unix/domain/PeerCredentialsTest.java | 2 +- .../newsclub/net/unix/domain/SocketTest.java | 2 +- .../unix/java/JavaInetStackRequirement.java | 4 +- .../demo/AFUNIXDatabaseSocketFactoryDemo.java | 2 +- .../newsclub/net/unix/demo/DemoHelper.java | 2 +- .../net/unix/demo/SimpleTestClient.java | 6 +- .../net/unix/demo/SimpleTestServer.java | 14 ++-- .../net/unix/demo/client/DemoClient.java | 2 +- .../net/unix/demo/client/DemoClientBase.java | 2 +- .../net/unix/demo/jdbc/PostgresDemo.java | 2 +- .../demo/nanohttpd/NanoHttpdServerDemo.java | 4 +- .../unix/demo/okhttp/OkHttpClientDemo.java | 4 +- .../demo/okhttp/OkHttpClientTIPCDemo.java | 4 +- .../net/unix/demo/rmi/HelloWorldImpl.java | 4 +- .../net/unix/demo/rmi/SimpleRMIClient.java | 2 +- .../rmi/SimpleRMIClientActingAsServer.java | 6 +- .../net/unix/demo/rmi/SimpleRMIServer.java | 2 +- .../newsclub/net/unix/demo/rmi/WorldImpl.java | 4 +- .../net/unix/demo/rmi/fd/StreamClient.java | 4 +- .../net/unix/demo/rmi/fd/StreamServer.java | 8 +- .../unix/demo/rmi/fd/StreamServiceImpl.java | 8 +- .../unix/demo/rmi/services/HelloWorld.java | 6 +- .../unix/demo/rmi/services/StreamService.java | 6 +- .../net/unix/demo/rmi/services/World.java | 4 +- .../net/unix/demo/server/ChargenServer.java | 10 +-- .../net/unix/demo/server/DemoServerBase.java | 2 +- .../net/unix/demo/server/EchoServer.java | 2 +- .../net/unix/demo/server/NullServer.java | 2 +- .../demo/server/SendFileHandleServer.java | 2 +- .../unix/demo/server/SocketServerDemo.java | 2 +- .../net/unix/demo/server/ZeroServer.java | 2 +- .../unix/jetty/AFSocketClientConnector.java | 8 +- .../unix/jetty/AFSocketServerConnector.java | 44 +++++------ .../mysql/AFUNIXDatabaseSocketFactory.java | 6 +- .../lib/junixsocket/common/NarMetadata.java | 2 +- .../lib/junixsocket/common/package-info.java | 2 +- .../org/newsclub/net/unix/rmi/AFNaming.java | 46 ++++++------ .../net/unix/rmi/AFNamingProvider.java | 6 +- .../newsclub/net/unix/rmi/AFNamingRef.java | 2 +- .../newsclub/net/unix/rmi/AFRMIService.java | 22 +++--- .../net/unix/rmi/AFRMIServiceImpl.java | 2 +- .../net/unix/rmi/AFRMISocketFactory.java | 24 +++--- .../org/newsclub/net/unix/rmi/AFRegistry.java | 8 +- .../net/unix/rmi/AFRegistryAccess.java | 18 ++--- .../newsclub/net/unix/rmi/AFUNIXNaming.java | 26 +++---- .../net/unix/rmi/AFUNIXRMISocketFactory.java | 12 +-- .../newsclub/net/unix/rmi/AFUNIXRegistry.java | 4 +- .../rmi/DefaultRMIClientSocketFactory.java | 4 +- .../rmi/DefaultRMIServerSocketFactory.java | 4 +- .../org/newsclub/net/unix/rmi/RMIPorts.java | 6 +- .../net/unix/rmi/RemoteCloseable.java | 8 +- .../net/unix/rmi/RemoteCloseableImpl.java | 4 +- .../net/unix/rmi/RemoteFileDescriptor.java | 6 +- .../unix/rmi/RemoteFileDescriptorBase.java | 14 ++-- .../net/unix/rmi/RemoteFileInput.java | 8 +- .../net/unix/rmi/RemoteFileOutput.java | 8 +- .../newsclub/net/unix/rmi/RemotePeerInfo.java | 20 ++--- .../net/unix/rmi/ShutdownHookSupport.java | 14 ++-- .../java/org/newsclub/net/unix/rmi/Hello.java | 4 +- .../org/newsclub/net/unix/rmi/HelloImpl.java | 2 +- .../net/unix/rmi/JunixsocketVersionTest.java | 4 +- .../unix/rmi/NaiveFileInputStreamRemote.java | 4 +- .../net/unix/rmi/RMIPeerCredentialsTest.java | 2 +- .../net/unix/rmi/RemoteCloseableTest.java | 2 +- .../net/unix/rmi/RemoteCloseableThing.java | 2 +- .../unix/rmi/RemoteCloseableThingImpl.java | 2 +- .../net/unix/rmi/SelftestProvider.java | 2 +- .../net/unix/rmi/TestRegistryServer.java | 4 +- .../newsclub/net/unix/rmi/TestService.java | 2 +- .../net/unix/rmi/TestServiceImpl.java | 2 +- .../net/unix/selftest/nativeimage/Main.java | 4 +- .../newsclub/net/unix/selftest/Selftest.java | 18 ++--- .../net/unix/selftest/SelftestProvider.java | 4 +- .../net/unix/server/AFSocketServer.java | 6 +- .../net/unix/server/AFUNIXSocketServer.java | 10 +-- .../net/unix/server/SocketServer.java | 66 ++++++++--------- .../net/unix/tipc/AFTIPCDatagramChannel.java | 2 +- .../net/unix/tipc/AFTIPCDatagramSocket.java | 6 +- .../net/unix/tipc/AFTIPCDestName.java | 14 ++-- .../newsclub/net/unix/tipc/AFTIPCErrInfo.java | 12 +-- .../net/unix/tipc/AFTIPCGroupRequest.java | 22 +++--- .../net/unix/tipc/AFTIPCProtocolFamily.java | 2 +- .../net/unix/tipc/AFTIPCSelectorProvider.java | 6 +- .../net/unix/tipc/AFTIPCServerSocket.java | 10 +-- .../unix/tipc/AFTIPCServerSocketChannel.java | 2 +- .../newsclub/net/unix/tipc/AFTIPCSocket.java | 30 ++++---- .../net/unix/tipc/AFTIPCSocketChannel.java | 2 +- .../net/unix/tipc/AFTIPCSocketExtensions.java | 6 +- .../net/unix/tipc/AFTIPCSocketFactory.java | 8 +- .../net/unix/tipc/AFTIPCSocketOptions.java | 18 ++--- .../net/unix/tipc/AFTIPCSocketPair.java | 8 +- .../net/unix/tipc/AFTIPCTopologyEvent.java | 34 ++++----- .../unix/tipc/AFTIPCTopologySubscription.java | 44 +++++------ .../net/unix/tipc/AFTIPCTopologyWatcher.java | 34 ++++----- .../net/unix/tipc/SelftestProvider.java | 2 +- .../newsclub/net/unix/tipc/SocketTest.java | 2 +- .../unix/vsock/AFVSOCKDatagramChannel.java | 2 +- .../net/unix/vsock/AFVSOCKDatagramSocket.java | 6 +- .../net/unix/vsock/AFVSOCKProtocolFamily.java | 2 +- .../AFVSOCKProxyServerSocketConnector.java | 6 +- .../vsock/AFVSOCKProxySocketConnector.java | 8 +- .../unix/vsock/AFVSOCKSelectorProvider.java | 6 +- .../net/unix/vsock/AFVSOCKServerSocket.java | 10 +-- .../vsock/AFVSOCKServerSocketChannel.java | 2 +- .../net/unix/vsock/AFVSOCKSocket.java | 26 +++---- .../net/unix/vsock/AFVSOCKSocketChannel.java | 2 +- .../unix/vsock/AFVSOCKSocketExtensions.java | 2 +- .../net/unix/vsock/AFVSOCKSocketFactory.java | 2 +- .../net/unix/vsock/AFVSOCKSocketOptions.java | 2 +- .../net/unix/vsock/AFVSOCKSocketPair.java | 8 +- .../net/unix/vsock/SelftestProvider.java | 2 +- .../newsclub/net/unix/vsock/SocketTest.java | 2 +- 204 files changed, 1014 insertions(+), 1014 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java index 61649530b..a1f048088 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java @@ -39,7 +39,7 @@ /** * Describes an address family supported by junixsocket. - * + * * @param The corresponding {@link AFSocketAddress} subclass. * @author Christian Kohlschütter */ @@ -179,7 +179,7 @@ String getJuxInetAddressSuffix() { /** * Registers an address family. - * + * * @param The supported address type. * @param juxString The sockaddr_* identifier as registered in native code. * @param addressClass The supported address subclass. @@ -226,7 +226,7 @@ public static synchronized AFAddressFamily regist /** * Registers an implementation. - * + * * @param The supported address type. * @param juxString The sockaddr_* identifier as registered in native code. * @param addressFamily The supported address family as registered via @@ -274,7 +274,7 @@ AFSocketImplExtensions initImplExtensions(AncillaryDataSupport ancillaryDataS /** * Creates a new, unconnected, unbound socket compatible with this socket address. - * + * * @return The socket instance. * @throws IOException on error. */ @@ -288,7 +288,7 @@ public AFSocket newSocket() throws IOException { /** * Creates a new, unconnected, unbound server socket compatible with this socket address. - * + * * @return The server socket instance. * @throws IOException on error. */ @@ -302,7 +302,7 @@ public AFServerSocket newServerSocket() throws IOException { /** * Creates a new, unconnected, unbound {@link SocketChannel} compatible with this socket address. - * + * * @return The socket instance. * @throws IOException on error. */ @@ -313,7 +313,7 @@ public AFSocketChannel newSocketChannel() throws IOException { /** * Creates a new, unconnected, unbound {@link ServerSocketChannel} compatible with this socket * address. - * + * * @return The socket instance. * @throws IOException on error. */ @@ -330,10 +330,10 @@ AFSocketAddress parseURI(URI u, int overridePort) throws SocketException { /** * Returns the set of supported URI schemes that can be parsed to some {@link AFSocketAddress}. - * + * * The set is dependent on which {@link AFSocketAddress} implementations are registered with * junixsocket. - * + * * @return The set of supported URI schemes. */ public static synchronized Set uriSchemes() { @@ -344,7 +344,7 @@ public static synchronized Set uriSchemes() { /** * Returns the {@link SelectorProvider} associated with this address family, or {@code null} if no * such instance is registered. - * + * * @return The {@link SelectorProvider}. * @throws IllegalStateException on error. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java index 88f4a5290..24ee4a9e7 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java @@ -26,7 +26,7 @@ /** * The implementation-specifics for a given address family implementation. - * + * * @param The supported address type. * @author Christian Kohlschütter * @see AFSocketAddressConfig @@ -41,63 +41,63 @@ protected AFAddressFamilyConfig() { /** * Returns the implementation's {@link Socket} class. - * + * * @return The implementation's {@link Socket} class. */ protected abstract Class> socketClass(); /** * Returns the implementation's {@link Socket} constructor. - * + * * @return The implementation's {@link Socket} constructor. */ protected abstract AFSocket.Constructor socketConstructor(); /** * Returns the implementation's {@link ServerSocket} class. - * + * * @return The implementation's {@link ServerSocket} class. */ protected abstract Class> serverSocketClass(); /** * Returns the implementation's {@link ServerSocket} constructor. - * + * * @return The implementation's {@link ServerSocket} constructor. */ protected abstract AFServerSocket.Constructor serverSocketConstructor(); /** * Returns the implementation's {@link SocketChannel} class. - * + * * @return The implementation's {@link SocketChannel} class.. */ protected abstract Class> socketChannelClass(); /** * Returns the implementation's {@link ServerSocketChannel} class. - * + * * @return The implementation's {@link ServerSocketChannel} class. */ protected abstract Class> serverSocketChannelClass(); /** * Returns the implementation's {@link DatagramSocket} class. - * + * * @return The implementation's {@link DatagramSocket} class. */ protected abstract Class> datagramSocketClass(); /** * Returns the implementation's {@link DatagramSocket} constructor. - * + * * @return The implementation's {@link DatagramSocket} constructor. */ protected abstract AFDatagramSocket.Constructor datagramSocketConstructor(); /** * Returns the implementation's {@link DatagramChannel} class. - * + * * @return The implementation's {@link DatagramChannel} class. */ protected abstract Class> datagramChannelClass(); diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java index 0b67705ad..ac00f8c8c 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java @@ -26,7 +26,7 @@ /** * The core functionality of file descriptor based I/O. - * + * * @author Christian Kohlschütter */ class AFCore extends CleanableState { @@ -210,11 +210,11 @@ int write(ByteBuffer src, SocketAddress target, int options) throws IOException /** * Returns a per-thread reusable byte buffer for a given capacity. - * + * * If a thread-local buffer currently uses a smaller capacity, the buffer is replaced by a larger * one. If the capacity exceeds a configurable maximum, a new direct buffer is allocated but not * cached (i.e., the previously cached one is kept but not immediately returned to the caller). - * + * * @param capacity The desired capacity. * @return A byte buffer satisfying the requested capacity. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java index 665580039..cf65b3155 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java @@ -37,7 +37,7 @@ /** * A {@link DatagramChannel} implementation that works with junixsocket. - * + * * @author Christian Kohlschütter */ public abstract class AFDatagramChannel extends DatagramChannel @@ -46,7 +46,7 @@ public abstract class AFDatagramChannel extends Datag /** * Creates a new {@link AFDatagramChannel} instance. - * + * * @param selectorProvider The corresponding {@link SelectorProvider}. * @param socket The corresponding {@link Socket}. */ @@ -57,7 +57,7 @@ protected AFDatagramChannel(AFSelectorProvider selectorProvider, AFDatagramSo /** * Returns the corresponding {@link Socket}. - * + * * @return The socket. */ protected final AFDatagramSocket getAFSocket() { @@ -91,7 +91,7 @@ public final AFDatagramSocket socket() { /** * Returns the binding state of the socket. - * + * * @return true if the socket successfully bound to an address */ public final boolean isBound() { @@ -244,10 +244,10 @@ public final FileDescriptor getFileDescriptor() throws IOException { /** * Checks if this {@link DatagramSocket}'s bound filename should be removed upon {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @return {@code true} if an attempt is made to delete the socket file upon {@link #close()}. */ public final boolean isDeleteOnClose() { @@ -256,10 +256,10 @@ public final boolean isDeleteOnClose() { /** * Enables/disables deleting this {@link DatagramSocket}'s bound filename upon {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @param b Enabled if {@code true}. */ public final void setDeleteOnClose(boolean b) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java index d35194d23..d06b7cfdd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java @@ -36,7 +36,7 @@ /** * A {@link DatagramSocket} implementation that works with junixsocket. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ @@ -52,7 +52,7 @@ public abstract class AFDatagramSocket extends Datagr /** * Creates a new {@link AFDatagramSocket} instance. - * + * * @param impl The corresponding {@link SocketImpl} class. * @throws IOException on error. */ @@ -64,14 +64,14 @@ protected AFDatagramSocket(final AFDatagramSocketImpl impl) throws IOExceptio /** * Creates a new {@link DatagramChannel} that is associated with this socket. - * + * * @return The channel. */ protected abstract AFDatagramChannel newChannel(); /** * Returns the {@link AncillaryDataSupport} instance. - * + * * @return The instance. */ protected final AncillaryDataSupport getAncillaryDataSupport() { @@ -80,14 +80,14 @@ protected final AncillaryDataSupport getAncillaryDataSupport() { /** * A reference to the constructor of an {@link AFDatagramSocket} subclass. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. */ @FunctionalInterface public interface Constructor { /** * Constructs a new {@link DatagramSocket} instance. - * + * * @param fd The file descriptor. * @return The new instance. * @throws IOException on error. @@ -97,7 +97,7 @@ public interface Constructor { /** * Returns the {@link AFSocketAddress} type supported by this socket. - * + * * @return The supported {@link AFSocketAddress}. */ protected final Class socketAddressClass() { @@ -119,7 +119,7 @@ protected static final AFDatagramSocket newInstan /** * Creates a new {@link AFDatagramSocket}. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @param constructor The supplying constructor. * @param fdObj The file descriptor. @@ -169,12 +169,12 @@ public final void connect(InetAddress address, int port) { /** * Reads the next received packet without actually removing it from the queue. - * + * * In other words, once a packet is received, calling this method multiple times in a row will not * have further effects on the packet contents. - * + * * This call still blocks until at least one packet has been received and added to the queue. - * + * * @param p The packet. * @throws IOException on error. */ @@ -328,10 +328,10 @@ public final synchronized void bind(SocketAddress addr) throws SocketException { /** * Checks if this {@link AFDatagramSocket}'s bound filename should be removed upon * {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @return {@code true} if an attempt is made to delete the socket file upon {@link #close()}. */ public final boolean isDeleteOnClose() { @@ -340,10 +340,10 @@ public final boolean isDeleteOnClose() { /** * Enables/disables deleting this {@link AFDatagramSocket}'s bound filename upon {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @param b Enabled if {@code true}. */ public final void setDeleteOnClose(boolean b) { @@ -407,7 +407,7 @@ public final void receive(DatagramPacket p) throws IOException { /** * Returns the address family supported by this implementation. - * + * * @return The family. */ protected final AFAddressFamily addressFamily() { @@ -416,7 +416,7 @@ protected final AFAddressFamily addressFamily() { /** * Returns the internal helper instance for address-specific extensions. - * + * * @return The helper instance. * @throws UnsupportedOperationException if such extensions are not supported for this address * type. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java index b1320085f..2ce894155 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java @@ -36,7 +36,7 @@ /** * A {@link DatagramSocketImpl} implemented by junixsocket. - * + * * @param The associated address type. * @author Christian Kohlschütter */ @@ -56,7 +56,7 @@ public abstract class AFDatagramSocketImpl extends /** * Constructs a new {@link AFDatagramSocketImpl} using the given {@link FileDescriptor} (or null * to create a new one). - * + * * @param addressFamily The address family. * @param fd The file descriptor, or {@code null}. * @param socketType The socket type. @@ -375,7 +375,7 @@ final void updatePorts(int local, int remote) { /** * Returns the address family supported by this implementation. - * + * * @return The family. */ protected final AFAddressFamily<@NonNull A> getAddressFamily() { @@ -384,7 +384,7 @@ final void updatePorts(int local, int remote) { /** * Returns the internal helper instance for address-specific extensions. - * + * * @return The helper instance. * @throws UnsupportedOperationException if such extensions are not supported for this address * type. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java index 311e428d6..b7ab0b5c7 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java @@ -36,17 +36,17 @@ /** * A workaround to create an {@link InetAddress} for an {@link AFSocketAddress}. - * + * * {@link DatagramPacket} internally requires InetAddress compatibility. Even if it pretends to * accept {@link SocketAddress}es, it refuses anything other than {@link InetSocketAddress} * and then even stores host and port separately. - * + * * This implementation deserializes a specially crafted {@link InetAddress} with a hostname that * encodes the raw bytes of an {@link AFSocketAddress}. We do this because the deserialization code * path does not attempt DNS resolution (which would fail one way or another). - * + * * The hostnames we use end with ".junixsocket", to distinguish them from regular hostnames. - * + * * @author Christian Kohlschütter */ class AFInetAddress { @@ -94,12 +94,12 @@ class AFInetAddress { /** * Encodes a junixsocket socketAddress into a string that is (somewhat) guaranteed to not be * resolved by java.net code. - * + * * Implementation detail: The "[" prefix (with the corresponding "]" suffix missing from the * input) should cause an early {@link UnknownHostException} be thrown, which is caught within * {@link InetSocketAddress#InetSocketAddress(String, int)}, causing the hostname be marked as * "unresolved" (without an address set). - * + * * @param socketAddress The socket address. * @return A string, to be used when calling * {@link InetSocketAddress#InetSocketAddress(String, int)}, etc. @@ -141,7 +141,7 @@ static final String createUnresolvedHostname(byte[] socketAddress, AFAddressFami * address), without actually having to resolve the address via DNS, thus still carrying the * "hostname" field containing a hostname as returned by * {@link #createUnresolvedHostname(byte[])}. - * + * * @param socketAddress The socket address. * @return The {@link InetAddress}. */ @@ -182,7 +182,7 @@ static final byte[] unwrapAddress(InetAddress addr, AFAddressFamily af) try { return unwrapAddress(hostname, af); } catch (IllegalArgumentException e) { - throw (SocketException)new SocketException("Unsupported address").initCause(e); + throw (SocketException) new SocketException("Unsupported address").initCause(e); } } diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java index dc2423e4d..fc36095ff 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java @@ -21,7 +21,7 @@ /** * An {@link InputStream} for {@link AFSocket}, etc. - * + * * @author Christian Kohlschütter */ public abstract class AFInputStream extends InputStream implements FileDescriptorAccess { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java index 531cbbb1f..b91a7e31e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java @@ -23,7 +23,7 @@ /** * An {@link OutputStream} for {@link AFSocket}, etc. - * + * * @author Christian Kohlschütter */ public abstract class AFOutputStream extends OutputStream implements FileDescriptorAccess { @@ -37,11 +37,11 @@ public abstract class AFOutputStream extends OutputStream implements FileDescrip * Reads all bytes from the given input stream and writes the bytes to this output stream in the * order that they are read. On return, this input stream will be at end of stream. This method * does not close either stream. - * + * * This method effectively is the reverse notation of * {@link InputStream#transferTo(OutputStream)}, which may or may not be optimized for * {@link AFSocket}s. - * + * * @param in The {@link InputStream} to transfer from. * @return The number of bytes transferred. * @throws IOException on error. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java index 15f733eee..ef1ca6ed7 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java @@ -28,7 +28,7 @@ /** * A {@link Pipe}, natively implemented. - * + * * @author Christian Kohlschütter */ public final class AFPipe extends Pipe implements Closeable { @@ -172,7 +172,7 @@ public FileDescriptor getFileDescriptor() throws IOException { /** * Returns the options bitmask that is to be passed to native receive/send calls. - * + * * @return The options. */ int getOptions() { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java index 5fb4a4c16..efc3bc688 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java @@ -27,7 +27,7 @@ /** * Service-provider class for junixsocket selectors and selectable channels. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. */ public abstract class AFSelectorProvider extends SelectorProvider { @@ -41,7 +41,7 @@ protected AFSelectorProvider() { /** * Constructs a new pipe. - * + * * @param selectable {@code true} if the pipe should be selectable. * @return The pipe. * @throws IOException on error. @@ -52,7 +52,7 @@ private AFPipe newPipe(boolean selectable) throws IOException { /** * Constructs a new socket pair from two sockets. - * + * * @param The type of the pair. * @param s1 Some socket, the first one. * @param s2 Some socket, the second one. @@ -62,7 +62,7 @@ private AFPipe newPipe(boolean selectable) throws IOException { /** * Constructs a new socket. - * + * * @return The socket instance. * @throws IOException on error. */ @@ -70,21 +70,21 @@ private AFPipe newPipe(boolean selectable) throws IOException { /** * Returns the protocol family supported by this implementation. - * + * * @return The protocol family. */ protected abstract ProtocolFamily protocolFamily(); /** * Returns the address family supported by this implementation. - * + * * @return The address family. */ protected abstract AFAddressFamily<@NonNull A> addressFamily(); /** * Returns the domain ID for the supported protocol, as specified by {@link NativeUnixSocket}. - * + * * @return The domain ID. */ protected final int domainId() { @@ -93,7 +93,7 @@ protected final int domainId() { /** * Opens a socket pair of interconnected channels. - * + * * @return The new channel pair. * @throws IOException on error. */ @@ -113,7 +113,7 @@ public AFSocketPair> openSocketChannelPair() throws /** * Opens a socket pair of interconnected datagram channels. - * + * * @return The new channel pair. * @throws IOException on error. */ @@ -152,7 +152,7 @@ public final AFPipe openPipe() throws IOException { /** * Opens a pipe with support for selectors. - * + * * @return The new pipe * @throws IOException on error. */ @@ -185,7 +185,7 @@ public AFSocketChannel openSocketChannel() throws IOException { /** * Opens a socket channel connected to the given {@link SocketAddress}. - * + * * @param sa The socket address to connect to. * @return The new channel * @throws IOException on error. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java index d99fb104a..d37213b79 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java @@ -34,7 +34,7 @@ /** * The server part of a junixsocket socket. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ @@ -50,13 +50,13 @@ public abstract class AFServerSocket extends ServerSo /** * The constructor of the concrete subclass. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. */ public interface Constructor { /** * Creates a new {@link AFServerSocket} instance. - * + * * @param fd The file descriptor. * @return The new instance. * @throws IOException on error. @@ -67,7 +67,7 @@ public interface Constructor { /** * Constructs a new, unconnected instance. - * + * * @throws IOException if the operation fails. */ protected AFServerSocket() throws IOException { @@ -76,7 +76,7 @@ protected AFServerSocket() throws IOException { /** * Constructs a new instance, optionally associated with the given file descriptor. - * + * * @param fdObj The file descriptor, or {@code null}. * @throws IOException if the operation fails. */ @@ -90,14 +90,14 @@ protected AFServerSocket(FileDescriptor fdObj) throws IOException { /** * Creates a new AFServerSocketChannel for this socket. - * + * * @return The new instance. */ protected abstract AFServerSocketChannel newChannel(); /** * Creates a new AFSocketImpl. - * + * * @param fdObj The file descriptor. * @return The new instance. * @throws IOException on error. @@ -106,7 +106,7 @@ protected AFServerSocket(FileDescriptor fdObj) throws IOException { /** * Creates a new AFServerSocket instance, using the given subclass constructor. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @param instanceSupplier The subclass constructor. * @return The new instance. @@ -119,7 +119,7 @@ protected static AFServerSocket newInstance( /** * Creates a new AFServerSocket instance, using the given subclass constructor. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @param instanceSupplier The subclass constructor. * @param fdObj The file descriptor. @@ -163,7 +163,7 @@ protected static AFServerSocket newInstance( /** * Returns a new {@link ServerSocket} that is bound to the given {@link AFSocketAddress}. - * + * * @param instanceSupplier The constructor of the concrete subclass. * @param addr The socket file to bind to. * @param The concrete {@link AFSocketAddress} that is supported by this type. @@ -179,7 +179,7 @@ protected static AFServerSocket bindOn( /** * Returns a new {@link ServerSocket} that is bound to the given {@link AFSocketAddress}. - * + * * @param instanceSupplier The constructor of the concrete subclass. * @param addr The socket file to bind to. * @param deleteOnClose If {@code true}, the socket file (if the address points to a file) will be @@ -199,7 +199,7 @@ protected static AFServerSocket bindOn( /** * Returns a new, unbound {@link ServerSocket} that will always bind to the given * address, regardless of any socket address used in a call to bind. - * + * * @param instanceSupplier The constructor of the concrete subclass. * @param forceAddr The address to use. * @param The concrete {@link AFSocketAddress} that is supported by this type. @@ -216,7 +216,7 @@ protected static AFServerSocket forceBindOn( * Forces the address to be used for any subsequent call to {@link #bind(SocketAddress)} to be the * given one, regardless of what'll be passed to {@link #bind(SocketAddress, int)}, but doesn't * bind yet. - * + * * @param endpoint The forced endpoint address. * @return This {@link AFServerSocket}. */ @@ -323,7 +323,7 @@ AFSocket accept1(boolean throwOnFail) throws IOException { /** * Returns a new {@link AFSocket} instance. - * + * * @return The new instance. * @throws IOException on error. */ @@ -381,7 +381,7 @@ && isDeleteOnClose()) { /** * Registers a {@link Closeable} that should be closed when this socket is closed. - * + * * @param closeable The closeable. */ public final void addCloseable(Closeable closeable) { @@ -390,7 +390,7 @@ public final void addCloseable(Closeable closeable) { /** * Unregisters a previously registered {@link Closeable}. - * + * * @param closeable The closeable. */ public final void removeCloseable(Closeable closeable) { @@ -399,7 +399,7 @@ public final void removeCloseable(Closeable closeable) { /** * Checks whether everything is setup to support junixsocket sockets. - * + * * @return {@code true} if supported. */ public static boolean isSupported() { @@ -417,10 +417,10 @@ public static boolean isSupported() { /** * Checks if the local socket address returned by {@link #getLocalSocketAddress()} is still valid. - * + * * The address is no longer valid if the server socket has been closed, {@code null}, or another * server socket has been bound on that address. - * + * * @return {@code true} iff still valid. */ public boolean isLocalSocketAddressValid() { @@ -460,10 +460,10 @@ public final int getLocalPort() { /** * Checks if this {@link AFServerSocket}'s file should be removed upon {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @return {@code true} if an attempt is made to delete the socket file upon {@link #close()}. */ public final boolean isDeleteOnClose() { @@ -473,10 +473,10 @@ public final boolean isDeleteOnClose() { /** * Enables/disables deleting this {@link AFServerSocket}'s file (or other resource type) upon * {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @param b Enabled if {@code true}. */ public final void setDeleteOnClose(boolean b) { @@ -507,7 +507,7 @@ public final FileDescriptor getFileDescriptor() throws IOException { /** * Returns the address family supported by this implementation. - * + * * @return The family. */ protected final AFAddressFamily addressFamily() { @@ -517,9 +517,9 @@ protected final AFAddressFamily addressFamily() { /** * Sets the hook for any subsequent call to {@link #bind(SocketAddress)} and * {@link #bind(SocketAddress, int)} to be the given function. - * + * * The function can monitor calls or even alter the endpoint address. - * + * * @param hook The function that gets called for each {@code bind} call. * @return This instance. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java index 87dd4c5a9..cd774e15b 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java @@ -33,7 +33,7 @@ /** * A selectable channel for stream-oriented listening sockets. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ @@ -43,7 +43,7 @@ public abstract class AFServerSocketChannel extends S /** * Creates a new {@link AFServerSocketChannel} instance. - * + * * @param socket The corresponding {@link ServerSocket}. * @param sp The corresponding {@link SelectorProvider}. */ @@ -116,10 +116,10 @@ public final AFSocketAddress getLocalAddress() throws IOException { /** * Checks if the local socket address returned by {@link #getLocalAddress()} is still valid. - * + * * The address is no longer valid if the server socket has been closed, {@code null}, or another * server socket has been bound on that address. - * + * * @return {@code true} iff still valid. */ public final boolean isLocalSocketAddressValid() { @@ -147,10 +147,10 @@ public final FileDescriptor getFileDescriptor() throws IOException { /** * Checks if this {@link AFServerSocketChannel}'s file should be removed upon {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @return {@code true} if an attempt is made to delete the socket file upon {@link #close()}. */ public final boolean isDeleteOnClose() { @@ -160,10 +160,10 @@ public final boolean isDeleteOnClose() { /** * Enables/disables deleting this {@link AFServerSocketChannel}'s file (or other resource type) * upon {@link #close()}. - * + * * Deletion is not guaranteed, especially when not supported (e.g., addresses in the abstract * namespace). - * + * * @param b Enabled if {@code true}. */ public final void setDeleteOnClose(boolean b) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java index 9946b31f1..a8558dd06 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java @@ -32,7 +32,7 @@ public interface AFServerSocketConnector { /** * Creates an {@link AFServerSocket} bound to the given address. - * + * * @param addr The address to bind to. * @return The bound socket. * @throws IOException on error. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java index 6df312e17..4e06ec5b3 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java @@ -33,7 +33,7 @@ /** * junixsocket's base implementation of a {@link Socket}. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ @@ -60,7 +60,7 @@ public abstract class AFSocket extends Socket impleme /** * Creates a new {@link AFSocket} instance. - * + * * @param impl The corresponding {@link SocketImpl} class. * @param afh The conversion helper to get a socket address from an encoded hostname. * @throws SocketException on error. @@ -74,7 +74,7 @@ protected AFSocket(final AFSocketImpl impl, AFSocketAddressFromHostname af /** * Returns the {@link AFSocketAddress} type supported by this socket. - * + * * @return The supported {@link AFSocketAddress}. */ protected final Class socketAddressClass() { @@ -83,21 +83,21 @@ protected final Class socketAddressClass() { /** * Creates a new {@link AFSocketChannel} for this socket. - * + * * @return The new instance. */ protected abstract AFSocketChannel newChannel(); /** * The reference to the constructor of an {@link AFSocket} subclass. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. */ @FunctionalInterface public interface Constructor { /** * Constructs a new {@link AFSocket} subclass instance. - * + * * @param fdObj The file descriptor. * @param factory The socket factory instance. * @return The instance. @@ -141,12 +141,12 @@ static AFSocket newInstance(Constructor constr /** * Creates a new, unbound {@link AFSocket}. - * + * * This "default" implementation is a bit "lenient" with respect to the specification. - * + * * In particular, we may ignore calls to {@link Socket#getTcpNoDelay()} and * {@link Socket#setTcpNoDelay(boolean)}. - * + * * @param The corresponding address type. * @param constr The implementation's {@link AFSocket} constructor * @param factory The corresponding socket factory, or {@code null}. @@ -166,7 +166,7 @@ protected static final AFSocket newInstance(Const /** * Creates a new {@link AFSocket} and connects it to the given {@link AFSocketAddress}. - * + * * @param The corresponding address type. * @param constr The implementation's {@link AFSocket} constructor * @param addr The address to connect to. @@ -183,7 +183,7 @@ protected static final AFSocket newInstance(Const /** * Creates a new {@link AFSocket} and connects it to the given {@link AFSocketAddress} using the * default implementation suited for that address type. - * + * * @param The corresponding address type. * @param addr The address to connect to. * @return A new, connected socket. @@ -198,7 +198,7 @@ public static final AFSocket connectTo(@NonNull A /** * Not supported, since it's not necessary for client sockets. - * + * * @see AFServerSocket */ @Override @@ -302,10 +302,10 @@ final String toStringSuffix() { /** * Returns true iff {@link AFSocket}s are supported by the current Java VM. - * + * * To support {@link AFSocket}s, a custom JNI library must be loaded that is supplied with * junixsocket. - * + * * @return {@code true} iff supported. */ public static boolean isSupported() { @@ -314,9 +314,9 @@ public static boolean isSupported() { /** * Checks if {@link AFSocket}s are supported by the current Java VM. - * + * * If not, an {@link UnsupportedOperationException} is thrown. - * + * * @throws UnsupportedOperationException if not supported. */ public static void ensureSupported() throws UnsupportedOperationException { @@ -325,9 +325,9 @@ public static void ensureSupported() throws UnsupportedOperationException { /** * Returns the version of the junixsocket library, as a string, for debugging purposes. - * + * * NOTE: Do not rely on the format of the version identifier, use socket capabilities instead. - * + * * @return String The version identifier, or {@code null} if it could not be determined. * @see #supports(AFSocketCapability) */ @@ -342,9 +342,9 @@ public static final String getVersion() { /** * Returns an identifier of the loaded native library, or {@code null} if the library hasn't been * loaded yet. - * + * * The identifier is useful mainly for debugging purposes. - * + * * @return The identifier of the loaded junixsocket-native library, or {@code null}. */ public static final String getLoadedLibrary() { @@ -400,12 +400,12 @@ private static boolean isCapDisabled(AFSocketCapability cap) { /** * Checks if the current environment (system platform, native library, etc.) supports a given * junixsocket capability. - * + * * Deprecated. Please use {@link #supports(AFSocketCapability)} instead. - * + * * NOTE: The result may or may not be cached from a previous call or from a check upon * initialization. - * + * * @param capability The capability. * @return true if supported. * @see #supports(AFSocketCapability) @@ -418,10 +418,10 @@ public static final boolean supports(AFUNIXSocketCapability capability) { /** * Checks if the current environment (system platform, native library, etc.) supports a given * junixsocket capability. - * + * * NOTE: The result may or may not be cached from a previous call or from a check upon * initialization. - * + * * @param capability The capability. * @return true if supported. */ @@ -442,7 +442,7 @@ public final synchronized void close() throws IOException { /** * Registers a {@link Closeable} that should be closed when this socket is closed. - * + * * @param closeable The closeable. */ public final void addCloseable(Closeable closeable) { @@ -451,7 +451,7 @@ public final void addCloseable(Closeable closeable) { /** * Unregisters a previously registered {@link Closeable}. - * + * * @param closeable The closeable. */ public final void removeCloseable(Closeable closeable) { @@ -514,7 +514,7 @@ public final AFOutputStream getOutputStream() throws IOException { /** * Returns the internal helper instance for address-specific extensions. - * + * * @return The helper instance. * @throws UnsupportedOperationException if such extensions are not supported for this address * type. @@ -526,7 +526,7 @@ protected final AFSocketImplExtensions getImplExtensions() { /** * Forces the address to be used for any subsequent call to {@link #connect(SocketAddress)} to be * the given one, regardless of what'll be passed there. - * + * * @param endpoint The forced endpoint address. * @return This instance. */ @@ -539,9 +539,9 @@ public final AFSocket forceConnectAddress(SocketAddress endpoint) { /** * Sets the hook for any subsequent call to {@link #connect(SocketAddress)} or * {@link #connect(SocketAddress, int)} to be the given function. - * + * * The function can monitor events or even alter the target address. - * + * * @param hook The function that gets called for each connect call. * @return This instance. */ @@ -552,10 +552,10 @@ public final AFSocket connectHook(SocketAddressFilter hook) { /** * Probes the status of the socket connection. - * + * * This usually involves checking for {@link #isConnected()}, and if assumed connected, also * sending a zero-length message to the remote. - * + * * @return {@code true} if the connection is known to be closed, {@code false} if the connection * is open/not closed or the condition is unknown. * @throws IOException on an unexpected error. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index 13ff3a541..f95bc2ada 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -39,7 +39,7 @@ /** * Some {@link SocketAddress} that is supported by junixsocket, such as {@link AFUNIXSocketAddress}. - * + * * @author Christian Kohlschütter */ public abstract class AFSocketAddress extends InetSocketAddress { @@ -96,7 +96,7 @@ protected ByteBuffer initialValue() { /** * Creates a new socket address. - * + * * @param port The port. * @param socketAddress The socket address in junixsocket-specific byte-array representation. * @param nativeAddress The socket address in system-native representation. @@ -108,7 +108,7 @@ protected AFSocketAddress(int port, final byte[] socketAddress, ByteBuffer nativ /* * Initializing the superclass with an unresolved hostname helps us pass the #equals and * #hashCode checks, which unfortunately are declared final in InetSocketAddress. - * + * * Using a resolved address (with the address bit initialized) would be ideal, but resolved * addresses can only be IPv4 or IPv6 (at least as of Java 16 and earlier). */ @@ -136,7 +136,7 @@ protected AFSocketAddress(int port, final byte[] socketAddress, ByteBuffer nativ /** * Only for {@link SentinelSocketAddress}. - * + * * @param clazz The {@link SentinelSocketAddress} class. * @param port A sentinel port number. */ @@ -150,17 +150,17 @@ protected AFSocketAddress(Class clazz, int port) { /** * Checks if the address can be resolved to a {@link File}. - * + * * @return {@code true} if the address has a filename. */ public abstract boolean hasFilename(); /** * Returns the {@link File} corresponding with this address, if possible. - * + * * A {@link FileNotFoundException} is thrown if there is no filename associated with the address, * which applies to addresses in the abstract namespace, for example. - * + * * @return The filename. * @throws FileNotFoundException if the address is not associated with a filename. */ @@ -168,7 +168,7 @@ protected AFSocketAddress(Class clazz, int port) { /** * Returns the corresponding {@link AFAddressFamily}. - * + * * @return The address family instance. */ public final AFAddressFamily getAddressFamily() { @@ -177,7 +177,7 @@ public final AFAddressFamily getAddressFamily() { /** * Wraps the socket name/peer name of a file descriptor as an {@link InetAddress}. - * + * * @param fdesc The file descriptor. * @param peerName If {@code true}, the remote peer name (instead of the local name) is retrieved. * @param af The address family. @@ -197,7 +197,7 @@ protected static final InetAddress getInetAddress(FileDescriptor fdesc, boolean /** * Gets the socket name/peer name of a file descriptor as an {@link AFSocketAddress}. - * + * * @param The corresponding address type. * @param fdesc The file descriptor. * @param peerName If {@code true}, the remote peer name (instead of the local name) is retrieved. @@ -259,7 +259,7 @@ static final AFSocketAddress preprocessSocketAddress( /** * Returns the (non-native) byte-level representation of this address. - * + * * @return The byte array. */ protected final byte[] getBytes() { @@ -269,12 +269,12 @@ protected final byte[] getBytes() { /** * Returns a "special" {@link InetAddress} that contains information about this * {@link AFSocketAddress}. - * + * * IMPORTANT: This {@link InetAddress} does not properly compare (using * {@link InetAddress#equals(Object)} and {@link InetAddress#hashCode()}). It should be used * exclusively to circumvent existing APIs like {@link DatagramSocket} that only accept/return * {@link InetAddress} and not arbitrary {@link SocketAddress} types. - * + * * @return The "special" {@link InetAddress}. */ public final InetAddress wrapAddress() { @@ -283,7 +283,7 @@ public final InetAddress wrapAddress() { /** * A reference to the constructor of an AFSocketAddress subclass. - * + * * @param The actual subclass. * @author Christian Kohlschütter */ @@ -291,7 +291,7 @@ public final InetAddress wrapAddress() { protected interface AFSocketAddressConstructor { /** * Constructs a new AFSocketAddress instance. - * + * * @param port The port. * @param socketAddress The socket address in junixsocket-specific byte-array representation. * @param nativeAddress The socket address in system-native representation. @@ -306,7 +306,7 @@ T newAFSocketAddress(int port, byte[] socketAddress, ByteBuffer nativeAddress) /** * Resolves a junixsocket-specific byte-array representation of an {@link AFSocketAddress} to an * actual {@link AFSocketAddress} instance, possibly reusing a cached instance. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @param socketAddress The socket address in junixsocket-specific byte-array representation. * @param port The port. @@ -408,7 +408,7 @@ static final A ofInternal(ByteBuffer socketAddressBu /** * Wraps an address as an {@link InetAddress}. - * + * * @param af The address family. * @return The {@link InetAddress}. */ @@ -421,7 +421,7 @@ protected final synchronized InetAddress getInetAddress(AFAddressFamily af) { /** * Wraps this address as an {@link InetAddress}. - * + * * @return The {@link InetAddress}. */ protected final InetAddress getInetAddress() { @@ -439,7 +439,7 @@ static final ByteBuffer newSockAddrKeyBuffer(int length) { /** * Returns an {@link AFSocketAddress} given a special {@link InetAddress} that encodes the byte * sequence of an AF_UNIX etc. socket address, like those returned by {@link #wrapAddress()}. - * + * * @param The corresponding address type. * @param address The "special" {@link InetAddress}. * @param port The port (use 0 for "none"). @@ -460,7 +460,7 @@ protected static final A unwrap(InetAddress address, * Returns an {@link AFSocketAddress} given a special {@link InetAddress} hostname that encodes * the byte sequence of an AF_UNIX etc. socket address, like those returned by * {@link #wrapAddress()}. - * + * * @param The corresponding address type. * @param hostname The "special" hostname, as provided by {@link InetAddress#getHostName()}. * @param port The port (use 0 for "none"). @@ -498,7 +498,7 @@ static final int unwrapAddressDirectBufferInternal(ByteBuffer socketAddressBuffe /** * Returns a thread-local direct ByteBuffer containing the native socket address representation of * this {@link AFSocketAddress}. - * + * * @return The direct {@link ByteBuffer}. */ final ByteBuffer getNativeAddressDirectBuffer() { @@ -518,7 +518,7 @@ static final ByteBuffer getNativeAddressDirectBuffer(int limit) { /** * Checks if the given address is supported by this address family. - * + * * @param addr The address. * @param af The address family. * @return {@code true} if supported. @@ -529,9 +529,9 @@ protected static final boolean isSupportedAddress(InetAddress addr, AFAddressFam /** * Writes the native (system-level) representation of this address to the given buffer. - * + * * The position of the target buffer will be at the end (i.e., after) the written data. - * + * * @param buf The target buffer. * @throws IOException on error. */ @@ -544,7 +544,7 @@ public final void writeNativeAddressTo(ByteBuffer buf) throws IOException { /** * Creates a new socket connected to this address. - * + * * @return The socket instance. * @throws IOException on error. */ @@ -556,7 +556,7 @@ public AFSocket newConnectedSocket() throws IOException { /** * Creates a new server socket bound to this address. - * + * * @return The server socket instance. * @throws IOException on error. */ @@ -570,7 +570,7 @@ public AFServerSocket newBoundServerSocket() throws IOException { * Creates a new server socket force-bound to this address (i.e., any additional call to * {@link ServerSocket#bind(SocketAddress)} will ignore the passed address and use this one * instead. - * + * * @return The server socket instance. * @throws IOException on error. */ @@ -582,10 +582,10 @@ public AFServerSocket newForceBoundServerSocket() throws IOException { /** * Tries to parse the given URI and return a corresponding {@link AFSocketAddress} for it. - * + * * NOTE: Only certain URI schemes are supported, such as {@code unix://} (for * {@link AFUNIXSocketAddress}) and {@code tipc://} for {@link AFTIPCSocketAddress}. - * + * * @param u The URI. * @return The address. * @throws SocketException on error. @@ -598,10 +598,10 @@ public static AFSocketAddress of(URI u) throws SocketException { /** * Tries to parse the given URI and return a corresponding {@link AFSocketAddress} for it. - * + * * NOTE: Only certain URI schemes are supported, such as {@code unix://} (for * {@link AFUNIXSocketAddress}) and {@code tipc://} for {@link AFTIPCSocketAddress}. - * + * * @param u The URI. * @param overridePort The port to forcibly use, or {@code -1} for "don't override". * @return The address. @@ -619,7 +619,7 @@ public static AFSocketAddress of(URI u, int overridePort) throws SocketException /** * Tries to create a URI based on this {@link AFSocketAddress}. - * + * * @param scheme The target scheme. * @param template An optional template to reuse certain parameters (e.g., the "path" component * for an {@code http} request), or {@code null}. @@ -634,10 +634,10 @@ public URI toURI(String scheme, URI template) throws IOException { * Returns a address string that can be used with {@code socat}'s {@code SOCKET-CONNECT}, * {@code SOCKET-LISTEN}, {@code SOCKET-DATAGRAM}, etc., address types, or {@code null} if the * address type is not natively supported by this platform. - * + * * This call is mostly suited for debugging purposes. The resulting string is specific to the * platform the code is executed on, and thus may be different among platforms (or {@code null}). - * + * * @param socketType The socket type, or {@code null} to omit from string. * @param socketProtocol The socket protocol, or {@code null} to omit from string. * @return The string (such as 1:0:x2f746d702f796f), or {@code null} if unable to retrieve. @@ -682,13 +682,13 @@ public URI toURI(String scheme, URI template) throws IOException { /** * Checks if the given address could cover another address. - * + * * By default, this is only true if both addresses are regarded equal using * {@link #equals(Object)}. - * + * * However, implementations may support "wildcard" addresses, and this method would compare a * wildcard address against some non-wildcard address, for example. - * + * * @param other The other address that could be covered by this address. * @return {@code true} if the other address could be covered. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java index f4b6bc194..84aaea7b7 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java @@ -25,7 +25,7 @@ /** * The implementation-specifics for a given {@link AFSocketAddress} subclass implementation. - * + * * @param The supported address type. * @author Christian Kohlschütter * @see AFAddressFamilyConfig @@ -40,7 +40,7 @@ protected AFSocketAddressConfig() { /** * Tries to parse the given address-specific URI. - * + * * @param u The URI. * @param port The port to use, or {@code -1} for "unspecified". * @return The address. @@ -50,23 +50,23 @@ protected AFSocketAddressConfig() { /** * Returns the implementation's address constructor. - * + * * @return The implementation's address constructor. */ protected abstract AFSocketAddressConstructor addressConstructor(); /** * Returns the name of the implementation's selector provider class. - * + * * @return The name of the implementation's selector provider class. */ protected abstract String selectorProviderClassname(); /** * Returns the set of supported URI schemes that can be parsed via {@link #parseURI(URI,int)}. - * + * * These schemes must be unique to this {@link AFSocketAddress} type. - * + * * @return The set of supported URI schemes. */ protected abstract Set uriSchemes(); diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java index c7d67a8af..7fa905d2d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java @@ -22,13 +22,13 @@ /** * Helps converting an internet "hostname" to an {@link AFSocketAddress}. - * + * * @author Christian Kohlschütter */ public interface AFSocketAddressFromHostname { /** * Translates a "host" string (and port) to an {@link AFSocketAddress}. - * + * * @param host The hostname * @param port The port, or 0. * @return The {@link AFSocketAddress} @@ -40,7 +40,7 @@ public interface AFSocketAddressFromHostname { /** * Checks whether the given hostname is supported by this socket factory. If not, calls to * createSocket will cause a {@link SocketException}. - * + * * @param host The host to check. * @return {@code true} if supported. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java index 0fb7019db..da16b2fcd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java @@ -22,7 +22,7 @@ /** * Describes junixsocket capabilities the current environment (system platform, native library, * etc.) may or may not support. - * + * * You can check whether your environment supports a given capability by calling * {@link AFSocket#supports(AFSocketCapability)}. */ @@ -46,11 +46,11 @@ public enum AFSocketCapability { /** * A pair of interconnected sockets can be created natively as AF_UNIX sockets. - * + * * This currently not possible on Windows, but instead emulated via anonymous AF_INET ports when * you use {@link AFSocketPair}. Other systems may provide partial implementations of pipe-based * (i.e., non-socket) pairs. - * + * * This capability is specific to AF_UNIX sockets. Other sockets, such as AF_VSOCK, may not * implement socketpair natively even if this capability is set, but would work-around that * limitation in a similar fashion but maybe without resorting to AF_INET. @@ -59,14 +59,14 @@ public enum AFSocketCapability { /** * A file descriptor can be converted to {@link Redirect}. - * + * * This feature currently uses Java SDK internals that may change/disappear. */ CAPABILITY_FD_AS_REDIRECT(6), /** * Support for AF_TIPC. - * + * * Availability of this feature is checked upon launch and therefore loading the "tipc" kernel * module at a later point may not be properly reflected. */ @@ -74,10 +74,10 @@ public enum AFSocketCapability { /** * Support for AF_UNIX. - * + * * Availability of this feature is checked upon launch and therefore, on systems adding support at * a later point, may not be properly reflected when checking at a later point. - * + * * NOTE: While this capability is typically supported on most systems that can actually load a * junixsocket JNI library, it is unavailable for older Windows versions (such as 8.1, 10 before * AFUNIX.SYS was included, etc.) and on systems where support for UNIX domain sockets is actively @@ -90,7 +90,7 @@ public enum AFSocketCapability { * * Availability of this feature is checked upon launch and therefore enabling vsock at a later * point may not be properly reflected. - * + * * @see #CAPABILITY_VSOCK_DGRAM */ CAPABILITY_VSOCK(9), @@ -106,10 +106,10 @@ public enum AFSocketCapability { /** * Support for zero-length send(2). - * + * * This can be used to perform a connection check, but not all operating systems support this or * behave correctly (particularly, IBM AIX, IBM i, and IBM z/OS) at the moment. - * + * * If not supported, junixsocket will simply ignore writes of zero-length, and connection checking * with {@link AFSocket#checkConnectionClosed()} may return {@code false} regardless of the actual * condition. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java index 5c05353df..65156f791 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java @@ -34,7 +34,7 @@ /** * A selectable channel for stream-oriented connecting sockets. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ @@ -45,7 +45,7 @@ public abstract class AFSocketChannel extends SocketC /** * Creates a new socket channel for the given socket, using the given {@link SelectorProvider}. - * + * * @param socket The socket. * @param sp The {@link SelectorProvider}. */ @@ -57,7 +57,7 @@ protected AFSocketChannel(AFSocket socket, AFSelectorProvider sp) { /** * Returns the corresponding {@link AFSocket}. - * + * * @return The corresponding socket. */ protected final AFSocket getAFSocket() { @@ -66,14 +66,14 @@ protected final AFSocket getAFSocket() { /** * A reference to a method that provides an {@link AFSocket} instance. - * + * * @param The concrete {@link AFSocketAddress} that is supported by this type. */ @FunctionalInterface protected interface AFSocketSupplier { /** * Returns a new {@link AFSocket} instance. - * + * * @return The instance. * @throws IOException on error. */ @@ -85,7 +85,7 @@ protected interface AFSocketSupplier { * * @param The concrete {@link AFSocketAddress} that is supported by this type. * @param supplier The AFSocketChannel constructor. - * + * * @return The new channel * @throws IOException on error. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java index 999e23a79..ca3482c6e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java @@ -31,7 +31,7 @@ public interface AFSocketConnector { /** * Connect to the socket at the given address. - * + * * @param addr The address to connect to. * @return The connected socket. * @throws IOException on error. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java index 9fa3276ff..f19e182d1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java @@ -25,7 +25,7 @@ /** * A shared core that is common for all AF* sockets (datagrams, streams). - * + * * @author Christian Kohlschütter */ class AFSocketCore extends AFCore { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java index 5ea9f9dd1..15cb47679 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java @@ -20,35 +20,35 @@ /** * Defines certain methods that all junixsocket socket implementations share and extend beyond the * standard socket API. - * + * * The set of features include methods to support working with ancillary messages (such as file * descriptors) as well as socket credentials. - * + * * Keep in mind that the platform this code runs on may not support these features, and exceptions * may be thrown when not checking for the corresponding {@link AFSocketCapability} first. - * + * * @author Christian Kohlschütter */ public interface AFSocketExtensions { /** * Returns the size of the receive buffer for ancillary messages (in bytes). - * + * * @return The size. */ int getAncillaryReceiveBufferSize(); /** * Sets the size of the receive buffer for ancillary messages (in bytes). - * + * * To disable handling ancillary messages, set it to 0 (default). - * + * * @param size The size. */ void setAncillaryReceiveBufferSize(int size); /** * Ensures a minimum ancillary receive buffer size. - * + * * @param minSize The minimum size (in bytes). */ void ensureAncillaryReceiveBufferSize(int minSize); diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java index e4aba2fdc..0ca0ccea7 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java @@ -28,10 +28,10 @@ /** * The base for a SocketFactory that connects to UNIX sockets. - * + * * Typically, the "hostname" is used as a reference to a socketFile on the file system. The actual * mapping is left to the implementor. - * + * * @see AFUNIXSocketFactory */ public abstract class AFSocketFactory extends SocketFactory implements @@ -47,10 +47,10 @@ protected AFSocketFactory() { /** * Checks whether the given {@link InetAddress} is supported by this socket factory. If not, calls * to createSocket will cause a {@link SocketException}. - * + * * By default, this only checks the hostname part of the address via * {@link #isHostnameSupported(String)}. - * + * * @param address The address to check. * @return {@code true} if supported. */ @@ -63,7 +63,7 @@ protected final boolean isInetAddressSupported(InetAddress address) { /** * Creates a new {@link AFSocket}, connected to the given address. - * + * * @param addr The address to connect to. * @return The socket instance. * @throws IOException on error. @@ -140,7 +140,7 @@ public static final class FixedAddressSocketFactory extends AFSocketFactory addressFamily, FileDescriptor /** * Creates a new {@link InputStream} for this socket. - * + * * @return The new stream. */ protected final AFInputStream newInputStream() { @@ -176,7 +176,7 @@ protected final AFInputStream newInputStream() { /** * Creates a new {@link OutputStream} for this socket. - * + * * @return The new stream. */ protected final AFOutputStream newOutputStream() { @@ -747,7 +747,7 @@ private void setOption0(int optID, Object value) throws SocketException { /** * Like {@link #getOption(int)}, but ignores exceptions for certain option IDs. - * + * * @param optID The option ID. * @return The value. * @throws SocketException on error. @@ -768,7 +768,7 @@ protected final Object getOptionLenient(int optID) throws SocketException { /** * Like {@link #setOption(int, Object)}, but ignores exceptions for certain option IDs. - * + * * @param optID The option ID. * @param value The value. * @throws SocketException on error. @@ -844,7 +844,7 @@ static final void setOptionDefault(FileDescriptor fdesc, int optID, Object value /** * Shuts down both input and output at once. Equivalent to calling {@link #shutdownInput()} and * {@link #shutdownOutput()}. - * + * * @throws IOException on error. */ protected final void shutdown() throws IOException { @@ -995,7 +995,7 @@ protected Set> supportedOptions() { /** * Returns the internal helper instance for address-specific extensions. - * + * * @return The helper instance. * @throws UnsupportedOperationException if such extensions are not supported for this address * type. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java index 8e9ae8837..966ac3b7a 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java @@ -19,7 +19,7 @@ /** * Placeholder for protocol-specific code that resides in the native library. - * + * * @param The corresponding address type. * @author Christian Kohlschütter * @see AFTIPCSocketImplExtensions diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java index d69ef554b..670afdff6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java @@ -21,7 +21,7 @@ /** * A special socket option supported by some junixsocket-based implementation. - * + * * @param The option's value type. * @author Christian Kohlschütter */ @@ -33,7 +33,7 @@ public final class AFSocketOption implements SocketOption { /** * Creates a new socket option. This should only be called by {@link AFSocket} implementations. - * + * * @param name The name of the option. * @param type The value type. * @param level The socket level (as defined in junixsocket-native). diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java index 051ee7f63..c0bffd68a 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java @@ -23,14 +23,14 @@ /** * A pair of sockets. - * + * * @param The socket type. * @author Christian Kohlschütter */ public abstract class AFSocketPair extends CloseablePair { /** * Creates a socket pair. - * + * * @param a The first socket. * @param b The second socket. */ @@ -40,7 +40,7 @@ protected AFSocketPair(T a, T b) { /** * Creates a socket pair. - * + * * @param a The first socket. * @param b The second socket. * @param alsoClose Some closeable that is also closed upon {@link #close()}, or {@code null}. @@ -51,7 +51,7 @@ protected AFSocketPair(T a, T b, Closeable alsoClose) { /** * Returns the first socket of the pair. - * + * * @return The first socket. */ public final @NonNull T getSocket1() { @@ -60,7 +60,7 @@ protected AFSocketPair(T a, T b, Closeable alsoClose) { /** * Returns the second socket of the pair. - * + * * @return The second socket. */ public final @NonNull T getSocket2() { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java index f64fce676..b458ed60b 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java @@ -19,7 +19,7 @@ /** * Describes the "protocol" part of a socket. - * + * * @author Christian Kohlschütter */ public enum AFSocketProtocol { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java index c0f65dec8..158ceb24c 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java @@ -19,7 +19,7 @@ /** * Describes the "type" of a socket. - * + * * @author Christian Kohlschütter */ public enum AFSocketType { @@ -40,7 +40,7 @@ public enum AFSocketType { /** * Reliably-delivered datagram messages. - * + * * Used by {@code AFTIPCDatagramSocket} to differentiate between datagram connects that may or may * not permit package loss. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java index 7315c12de..08d98c5d1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java @@ -29,7 +29,7 @@ /** * Marker interface that combines junixsocket-based {@link SocketChannel}s, {@link Socket}s, * {@link DatagramChannel}s and {@link DatagramSocket}s. - * + * * @author Christian Kohlschütter * @see AFSocketPair * @see AFSocket @@ -41,7 +41,7 @@ public interface AFSomeSocket extends Closeable, FileDescriptorAccess { /** * Returns the socket's local socket address, or {@code null} if unavailable or if there was a * problem retrieving it. - * + * * @return The local socket address, or {@code null}. */ @Nullable @@ -50,7 +50,7 @@ public interface AFSomeSocket extends Closeable, FileDescriptorAccess { /** * Returns the socket's remote socket address, or {@code null} if unavailable/not connected, or if * there was a problem retrieving it. - * + * * @return The remote socket address, or {@code null}. */ @Nullable diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java index 5efcb28ef..8d85652bc 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java @@ -40,7 +40,7 @@ /** * An {@link AFSocketAddress} for TIPC sockets. - * + * * The TIPC socket API provides three different address types: *
    *
  • Service Address. @@ -106,7 +106,7 @@ * indicated node. If this value is zero, all matching sockets in the whole cluster, as visible from * the source node, are eligible. *

    - * + * * @author Christian Kohlschütter (documentation credits to Jon Maloy and the TIPC team). */ public final class AFTIPCSocketAddress extends AFSocketAddress { @@ -131,7 +131,7 @@ public final class AFTIPCSocketAddress extends AFSocketAddress { /** * The TIPC address type. - * + * * @author Christian Kohlschütter */ @NonNullByDefault @@ -191,7 +191,7 @@ interface DebugStringProvider extends Serializable { /** * Formats an integer as an unsigned, zero-padded 32-bit hexadecimal number. - * + * * @param i The number. * @return The string. */ @@ -211,7 +211,7 @@ private String toDebugString(Scope scope, int a, int b, int c) { /** * The TIPC visibility scope. - * + * * @author Christian Kohlschütter */ @NonNullByDefault @@ -249,7 +249,7 @@ private Scope(String name, int id) { /** * Returns a {@link Scope} instance given an integer value. - * + * * @param v The scope value. * @return The {@link Scope} instance. */ @@ -294,7 +294,7 @@ public static AFTIPCSocketAddress ofService(int type, int instance) throws Socke /** * Returns an {@link AFTIPCSocketAddress} that refers to a given service type and instance, using * the given scope and the given lookup domain. - * + * * @param scope The address scope. * @param type The service type (0-63 are reserved). * @param instance The service instance ID. @@ -434,7 +434,7 @@ private static int parseUnsignedInt(String v) { /** * Returns an {@link AFTIPCSocketAddress} given a special {@link InetAddress} that encodes the * byte sequence of an AF_TIPC socket address, like those returned by {@link #wrapAddress()}. - * + * * @param address The "special" {@link InetAddress}. * @param port The port (use 0 for "none"). * @return The {@link AFTIPCSocketAddress} instance. @@ -449,7 +449,7 @@ public static AFTIPCSocketAddress unwrap(InetAddress address, int port) throws S * Returns an {@link AFTIPCSocketAddress} given a special {@link InetAddress} hostname that * encodes the byte sequence of an AF_TIPC socket address, like those returned by * {@link #wrapAddress()}. - * + * * @param hostname The "special" hostname, as provided by {@link InetAddress#getHostName()}. * @param port The port (use 0 for "none"). * @return The {@link AFTIPCSocketAddress} instance. @@ -462,7 +462,7 @@ public static AFTIPCSocketAddress unwrap(String hostname, int port) throws Socke /** * Returns an {@link AFTIPCSocketAddress} given a generic {@link SocketAddress}. - * + * * @param address The address to unwrap. * @return The {@link AFTIPCSocketAddress} instance. * @throws SocketException if the operation fails, for example when an unsupported address is @@ -478,7 +478,7 @@ public static AFTIPCSocketAddress unwrap(SocketAddress address) throws SocketExc /** * Returns the scope of this address. - * + * * @return The scope. */ public Scope getScope() { @@ -491,7 +491,7 @@ public Scope getScope() { /** * Returns the TIPC type part of this address. - * + * * @return The type identifier */ public int getTIPCType() { @@ -502,7 +502,7 @@ public int getTIPCType() { /** * Returns the TIPC instance part of this address. - * + * * @return The instance identifier. */ public int getTIPCInstance() { @@ -513,7 +513,7 @@ public int getTIPCInstance() { /** * Returns the TIPC domain part of this address. - * + * * @return The domain identifier. */ public int getTIPCDomain() { @@ -524,7 +524,7 @@ public int getTIPCDomain() { /** * Returns the TIPC lower instance of this address. - * + * * @return The lower instance identifier. */ public int getTIPCLower() { @@ -535,7 +535,7 @@ public int getTIPCLower() { /** * Returns the TIPC upper instance of this address. - * + * * @return The lower instance identifier. */ public int getTIPCUpper() { @@ -546,7 +546,7 @@ public int getTIPCUpper() { /** * Returns the TIPC ref of this address. - * + * * @return The ref identifier. */ public int getTIPCRef() { @@ -557,7 +557,7 @@ public int getTIPCRef() { /** * Returns the TIPC node hash of this address. - * + * * @return The node hash. */ public int getTIPCNodeHash() { @@ -602,7 +602,7 @@ public File getFile() throws FileNotFoundException { /** * Checks if an {@link InetAddress} can be unwrapped to an {@link AFTIPCSocketAddress}. - * + * * @param addr The instance to check. * @return {@code true} if so. * @see #wrapAddress() @@ -614,7 +614,7 @@ public static boolean isSupportedAddress(InetAddress addr) { /** * Checks if a {@link SocketAddress} can be unwrapped to an {@link AFTIPCSocketAddress}. - * + * * @param addr The instance to check. * @return {@code true} if so. * @see #unwrap(InetAddress, int) @@ -636,7 +636,7 @@ private static byte[] toBytes(AddressType addrType, Scope scope, int a, int b, i /** * Returns the corresponding {@link AFAddressFamily}. - * + * * @return The address family instance. */ @SuppressWarnings("null") @@ -684,7 +684,7 @@ private String toTipcInt(int v) { /** * Returns an {@link AFTIPCSocketAddress} for the given URI, if possible. - * + * * @param uri The URI. * @return The address. * @throws SocketException if the operation fails. @@ -696,7 +696,7 @@ public static AFTIPCSocketAddress of(URI uri) throws SocketException { /** * Returns an {@link AFTIPCSocketAddress} for the given URI, if possible. - * + * * @param uri The URI. * @param overridePort The port to forcibly use, or {@code -1} for "don't override". * @return The address. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java index 4a4268d55..7f9fd9fdc 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java @@ -23,7 +23,7 @@ /** * TIPC-specific code that resides in the native library. To be used by {@code AFTIPCSocket} and * {@code AFTIPCDatagramSocket} only. - * + * * @author Christian Kohlschütter */ public final class AFTIPCSocketImplExtensions implements @@ -36,9 +36,9 @@ public final class AFTIPCSocketImplExtensions implements /** * Returns the TIPC "ErrInfo" data from the ancillary receive buffer. - * + * * Invalid for any other use. - * + * * @return The errinfo. */ public int[] getTIPCErrInfo() { @@ -47,9 +47,9 @@ public int[] getTIPCErrInfo() { /** * Returns the TIPC "DestName" data from the ancillary receive buffer. - * + * * Invalid for any other use. - * + * * @return The DestName. */ public int[] getTIPCDestName() { @@ -58,7 +58,7 @@ public int[] getTIPCDestName() { /** * Retrieves the 16-byte TIPC node identity given a node hash. - * + * * @param peer The node hash. * @return The node identity, or {@code null} if unsupported. * @throws IOException on error. @@ -69,7 +69,7 @@ public byte[] getTIPCNodeId(int peer) throws IOException { /** * Retrieves the TIPC link name given a node hash and bearer Id. - * + * * @param peer The node hash. * @param bearerId The bearer Id. * @return The link name, or {@code null} if unsupported. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java index 79e2369d4..459be3762 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java @@ -25,7 +25,7 @@ /** * A {@link DatagramChannel} implementation that works with AF_UNIX Unix domain sockets. - * + * * @author Christian Kohlschütter */ public final class AFUNIXDatagramChannel extends AFDatagramChannel implements diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java index ab3329d5e..2381f65e0 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java @@ -24,7 +24,7 @@ /** * A {@link DatagramSocket} implementation that works with AF_UNIX Unix domain sockets. - * + * * @author Christian Kohlschütter */ public final class AFUNIXDatagramSocket extends AFDatagramSocket implements @@ -41,7 +41,7 @@ protected AFUNIXDatagramChannel newChannel() { /** * Returns a new {@link AFUNIXDatagramSocket} instance. - * + * * @return The new instance. * @throws IOException on error. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java index 5e8411bb2..81351ebd5 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java @@ -21,7 +21,7 @@ /** * Describes the protocol family supported by {@link AFUNIXSocketAddress} etc. - * + * * @author Christian Kohlschütter */ public enum AFUNIXProtocolFamily implements ProtocolFamily { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java index 9dbf8344c..7ca8582e0 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java @@ -88,7 +88,7 @@ private AFUNIXSelectorProvider() { /** * Returns the singleton instance. - * + * * @return The instance. */ @SuppressFBWarnings("MS_EXPOSE_REP") @@ -98,7 +98,7 @@ public static AFUNIXSelectorProvider getInstance() { /** * Returns the singleton instance. - * + * * @return The instance. */ public static AFUNIXSelectorProvider provider() { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java index d2d75fe1b..2d2ad367d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java @@ -26,13 +26,13 @@ /** * The server part of an AF_UNIX domain socket. - * + * * @author Christian Kohlschütter */ public class AFUNIXServerSocket extends AFServerSocket { /** * Constructs a new, unconnected instance. - * + * * @throws IOException if the operation fails. */ protected AFUNIXServerSocket() throws IOException { @@ -41,7 +41,7 @@ protected AFUNIXServerSocket() throws IOException { /** * Constructs a new instance, optionally associated with the given file descriptor. - * + * * @param fdObj The file descriptor, or {@code null}. * @throws IOException if the operation fails. */ @@ -61,7 +61,7 @@ public AFUNIXServerSocketChannel getChannel() { /** * Returns a new, unbound AF_UNIX {@link ServerSocket}. - * + * * @return The new, unbound {@link AFServerSocket}. * @throws IOException if the operation fails. */ @@ -78,7 +78,7 @@ static AFUNIXServerSocket newInstance(FileDescriptor fdObj, int localPort, int r /** * Returns a new AF_UNIX {@link ServerSocket} that is bound to the given * {@link AFUNIXSocketAddress}. - * + * * @param addr The socket file to bind to. * @return The new, bound {@link AFServerSocket}. * @throws IOException if the operation fails. @@ -89,7 +89,7 @@ public static AFUNIXServerSocket bindOn(final AFUNIXSocketAddress addr) throws I /** * Returns a new AF_UNIX {@link ServerSocket} that is bound to the given {@link AFSocketAddress}. - * + * * @param addr The socket file to bind to. * @param deleteOnClose If {@code true}, the socket file (if the address points to a file) will be * deleted upon {@link #close}. @@ -103,7 +103,7 @@ public static AFUNIXServerSocket bindOn(final AFUNIXSocketAddress addr, boolean /** * Returns a new AF_UNIX {@link ServerSocket} that is bound to the given path. - * + * * @param path The path to bind to. * @param deleteOnClose If {@code true}, the socket file will be deleted upon {@link #close}. * @return The new, bound {@link AFServerSocket}. @@ -116,7 +116,7 @@ public static AFUNIXServerSocket bindOn(final File path, boolean deleteOnClose) /** * Returns a new AF_UNIX {@link ServerSocket} that is bound to the given path. - * + * * @param path The path to bind to. * @param deleteOnClose If {@code true}, the socket file will be deleted upon {@link #close}. * @return The new, bound {@link AFServerSocket}. @@ -131,7 +131,7 @@ public static AFUNIXServerSocket bindOn(final Path path, boolean deleteOnClose) /** * Returns a new, unbound AF_UNIX {@link ServerSocket} that will always bind to the given * address, regardless of any socket address used in a call to bind. - * + * * @param forceAddr The address to use. * @return The new, yet unbound {@link AFServerSocket}. * @throws IOException if an exception occurs. @@ -148,7 +148,7 @@ protected AFUNIXSocketImpl newImpl(FileDescriptor fdObj) throws SocketException /** * Returns a new {@link AFSocket} instance. - * + * * @return The new instance. * @throws IOException on error. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java index be58f5b93..527515213 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java @@ -21,7 +21,7 @@ /** * A selectable channel for stream-oriented listening sockets. - * + * * @author Christian Kohlschütter */ public final class AFUNIXServerSocketChannel extends AFServerSocketChannel { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java index a4313402e..91f06e01e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java @@ -26,7 +26,7 @@ /** * Implementation of an AF_UNIX domain socket. - * + * * @author Christian Kohlschütter */ public final class AFUNIXSocket extends AFSocket implements @@ -58,12 +58,12 @@ protected AFUNIXSocketChannel newChannel() { /** * Creates a new, unbound {@link AFSocket}. - * + * * This "default" implementation is a bit "lenient" with respect to the specification. - * + * * In particular, we ignore calls to {@link Socket#getTcpNoDelay()} and * {@link Socket#setTcpNoDelay(boolean)}. - * + * * @return A new, unbound socket. * @throws IOException if the operation fails. */ @@ -87,10 +87,10 @@ static AFUNIXSocket newInstance(AFUNIXSocketFactory factory) throws SocketExcept /** * Creates a new, unbound, "strict" {@link AFSocket}. - * + * * This call uses an implementation that tries to be closer to the specification than * {@link #newInstance()}, at least for some cases. - * + * * @return A new, unbound socket. * @throws IOException if the operation fails. */ @@ -100,7 +100,7 @@ public static AFUNIXSocket newStrictInstance() throws IOException { /** * Creates a new {@link AFSocket} and connects it to the given {@link AFUNIXSocketAddress}. - * + * * @param addr The address to connect to. * @return A new, connected socket. * @throws IOException if the operation fails. @@ -147,14 +147,14 @@ public boolean hasOutboundFileDescriptors() { /** * Returns true iff {@link AFUNIXSocket}s are supported by the current Java VM. - * + * * To support {@link AFSocket}s, a custom JNI library must be loaded that is supplied with * junixsocket, and the system must support AF_UNIX sockets. - * + * * This call is equivalent to checking {@link AFSocket#isSupported()} and * {@link AFSocket#supports(AFSocketCapability)} with * {@link AFSocketCapability#CAPABILITY_UNIX_DOMAIN}. - * + * * @return {@code true} iff supported. */ public static boolean isSupported() { @@ -163,9 +163,9 @@ public static boolean isSupported() { /** * Very basic self-test function. - * + * * Prints "supported" and "capabilities" status to System.out. - * + * * @param args ignored. */ public static void main(String[] args) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java index 4325b2a56..136d06f40 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java @@ -40,10 +40,10 @@ /** * Describes an {@link InetSocketAddress} that actually uses AF_UNIX sockets instead of AF_INET. - * + * * The ability to specify a port number is not specified by AF_UNIX sockets, but we need it * sometimes, for example for RMI-over-AF_UNIX. - * + * * @author Christian Kohlschütter */ @SuppressWarnings("PMD.ShortMethodName") @@ -86,7 +86,7 @@ private AFUNIXSocketAddress(int port, final byte[] socketAddress, ByteBuffer nat /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * file and port. Legacy constructor, do not use! - * + * * @param socketFile The socket to connect to. * @throws SocketException if the operation fails. * @deprecated Use {@link #of(File)} instead. @@ -99,7 +99,7 @@ public AFUNIXSocketAddress(File socketFile) throws SocketException { /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * file. Legacy constructor, do not use! - * + * * @param socketFile The socket to connect to. * @param port The port associated with this socket, or {@code 0} when no port should be assigned. * @throws SocketException if the operation fails. @@ -114,7 +114,7 @@ public AFUNIXSocketAddress(File socketFile, int port) throws SocketException { /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * file. - * + * * @param socketFile The socket to connect to. * @return A corresponding {@link AFUNIXSocketAddress} instance. * @throws SocketException if the operation fails. @@ -126,7 +126,7 @@ public static AFUNIXSocketAddress of(final File socketFile) throws SocketExcepti /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * file, assigning the given port to it. - * + * * @param socketFile The socket to connect to. * @param port The port associated with this socket, or {@code 0} when no port should be assigned. * @return A corresponding {@link AFUNIXSocketAddress} instance. @@ -139,10 +139,10 @@ public static AFUNIXSocketAddress of(final File socketFile, int port) throws Soc /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * byte sequence. - * + * * NOTE: By specifying a byte array that starts with a zero byte, you indicate that the abstract * namespace is to be used. This feature is not available on all target platforms. - * + * * @param socketAddress The socket address (as bytes). * @return A corresponding {@link AFUNIXSocketAddress} instance. * @throws SocketException if the operation fails. @@ -155,7 +155,7 @@ public static AFUNIXSocketAddress of(final byte[] socketAddress) throws SocketEx /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * byte sequence, assigning the given port to it. - * + * * NOTE: By specifying a byte array that starts with a zero byte, you indicate that the abstract * namespace is to be used. This feature is not available on all target platforms. * @@ -173,7 +173,7 @@ public static AFUNIXSocketAddress of(final byte[] socketAddress, int port) /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * path. - * + * * @param socketPath The socket to connect to. * @return A corresponding {@link AFUNIXSocketAddress} instance. * @throws SocketException if the operation fails. @@ -185,7 +185,7 @@ public static AFUNIXSocketAddress of(final Path socketPath) throws SocketExcepti /** * Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given * path, assigning the given port to it. - * + * * @param socketPath The socket to connect to. * @param port The port associated with this socket, or {@code 0} when no port should be assigned. * @return A corresponding {@link AFUNIXSocketAddress} instance. @@ -197,7 +197,7 @@ public static AFUNIXSocketAddress of(final Path socketPath, int port) throws Soc /** * Returns an {@link AFUNIXSocketAddress} for the given URI, if possible. - * + * * @param u The URI. * @return The address. * @throws SocketException if the operation fails. @@ -208,7 +208,7 @@ public static AFUNIXSocketAddress of(URI u) throws SocketException { /** * Returns an {@link AFUNIXSocketAddress} for the given URI, if possible. - * + * * @param u The URI. * @param overridePort The port to forcibly use, or {@code -1} for "don't override". * @return The address. @@ -240,7 +240,7 @@ public static AFUNIXSocketAddress of(URI u, int overridePort) throws SocketExcep /** * Returns an {@link AFUNIXSocketAddress} that points to a temporary, non-existent but accessible * path in the file system. - * + * * @return A corresponding {@link AFUNIXSocketAddress} instance. * @throws IOException if the operation fails. */ @@ -251,7 +251,7 @@ public static AFUNIXSocketAddress ofNewTempFile() throws IOException { /** * Returns an {@link AFUNIXSocketAddress} that points to a temporary, non-existent but accessible * path in the file system, assigning the given port to it. - * + * * @param port The port associated with this socket, or {@code 0} when no port should be assigned. * @return A corresponding {@link AFUNIXSocketAddress} instance. * @throws IOException if the operation fails. @@ -274,7 +274,7 @@ static File newTempPath(boolean deleteOnExit) throws IOException { /** * Returns an {@link AFUNIXSocketAddress} given a special {@link InetAddress} that encodes the * byte sequence of an AF_UNIX socket address, like those returned by {@link #wrapAddress()}. - * + * * @param address The "special" {@link InetAddress}. * @param port The port (use 0 for "none"). * @return The {@link AFUNIXSocketAddress} instance. @@ -287,7 +287,7 @@ public static AFUNIXSocketAddress unwrap(InetAddress address, int port) throws S /** * Returns an {@link AFUNIXSocketAddress} given a generic {@link SocketAddress}. - * + * * @param address The address to unwrap. * @return The {@link AFUNIXSocketAddress} instance. * @throws SocketException if the operation fails, for example when an unsupported address is @@ -306,7 +306,7 @@ public static AFUNIXSocketAddress unwrap(SocketAddress address) throws SocketExc * Returns an {@link AFUNIXSocketAddress} given a special {@link InetAddress} hostname that * encodes the byte sequence of an AF_UNIX socket address, like those returned by * {@link #wrapAddress()}. - * + * * @param hostname The "special" hostname, as provided by {@link InetAddress#getHostName()}. * @param port The port (use 0 for "none"). * @return The {@link AFUNIXSocketAddress} instance. @@ -319,11 +319,11 @@ public static AFUNIXSocketAddress unwrap(String hostname, int port) throws Socke /** * Convenience method to create an {@link AFUNIXSocketAddress} in the abstract namespace. - * + * * The returned socket address will use the byte representation of this identifier (using the * system's default character encoding), prefixed with a null byte (to indicate the abstract * namespace is used). - * + * * @param name The identifier in the abstract namespace, without trailing zero or @. * @return The address. * @throws SocketException if the operation fails. @@ -334,11 +334,11 @@ public static AFUNIXSocketAddress inAbstractNamespace(String name) throws Socket /** * Convenience method to create an {@link AFUNIXSocketAddress} in the abstract namespace. - * + * * The returned socket address will use the byte representation of this identifier (using the * system's default character encoding), prefixed with a null byte (to indicate the abstract * namespace is used). - * + * * @param name The identifier in the abstract namespace, without trailing zero or @. * @param port The port associated with this socket, or {@code 0} when no port should be assigned. * @return The address. @@ -380,10 +380,10 @@ public String toString() { /** * Returns the path to the UNIX domain socket, as a human-readable string using the default * encoding. - * + * * For addresses in the abstract namespace, the US_ASCII encoding is used; zero-bytes are * converted to '@', other non-printable bytes are converted to '.' - * + * * @return The path. * @see #getPathAsBytes() */ @@ -411,10 +411,10 @@ public String getPath() { /** * Returns the {@link Charset} used to encode/decode {@link AFUNIXSocketAddress}es. - * + * * This is usually the system default charset, unless that is {@link StandardCharsets#US_ASCII} * (7-bit), in which case {@link StandardCharsets#ISO_8859_1} is used instead. - * + * * @return The charset. */ public static Charset addressCharset() { @@ -423,7 +423,7 @@ public static Charset addressCharset() { /** * Returns the path to the UNIX domain socket, as bytes. - * + * * @return The path. * @see #getPath() */ @@ -433,7 +433,7 @@ public byte[] getPathAsBytes() { /** * Checks if the address is in the abstract namespace. - * + * * @return {@code true} if the address is in the abstract namespace. */ public boolean isInAbstractNamespace() { @@ -462,7 +462,7 @@ public File getFile() throws FileNotFoundException { /** * Checks if an {@link InetAddress} can be unwrapped to an {@link AFUNIXSocketAddress}. - * + * * @param addr The instance to check. * @return {@code true} if so. * @see #wrapAddress() @@ -474,7 +474,7 @@ public static boolean isSupportedAddress(InetAddress addr) { /** * Checks if a {@link SocketAddress} can be unwrapped to an {@link AFUNIXSocketAddress}. - * + * * @param addr The instance to check. * @return {@code true} if so. * @see #unwrap(InetAddress, int) @@ -485,7 +485,7 @@ public static boolean isSupportedAddress(SocketAddress addr) { /** * Returns the corresponding {@link AFAddressFamily}. - * + * * @return The address family instance. */ @SuppressWarnings("null") diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java index 8e56621a8..5caeb6ced 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java @@ -20,12 +20,12 @@ /** * Describes junixsocket capabilities the current environment (system platform, native library, * etc.) may or may not support. - * + * * You can check whether your environment supports a given capability by calling * {@link AFUNIXSocket#supports(AFUNIXSocketCapability)}. - * + * * This enum is deprecated. Use {@link AFSocketCapability} instead. - * + * * @see AFSocketCapability */ @Deprecated @@ -49,7 +49,7 @@ public enum AFUNIXSocketCapability { /** * A pair of interconnected sockets can be created natively. - * + * * This currently not possible on Windows, but instead emulated via anonymous AF_INET ports when * you use {@link AFUNIXSocketPair}. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java index a5f27583f..18d61f827 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java @@ -24,7 +24,7 @@ /** * A selectable channel for stream-oriented connecting sockets. - * + * * @author Christian Kohlschütter */ public final class AFUNIXSocketChannel extends AFSocketChannel implements diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java index 28b7f7c93..9f0787ca3 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java @@ -63,7 +63,7 @@ public final class AFUNIXSocketCredentials implements Serializable { /** * Returns the "pid" (process ID), or {@code -1} if it could not be retrieved. - * + * * @return The pid, or -1. */ public long getPid() { @@ -72,7 +72,7 @@ public long getPid() { /** * Returns the "uid" (user ID), or {@code -1} if it could not be retrieved. - * + * * @return The uid, or -1. */ public long getUid() { @@ -81,7 +81,7 @@ public long getUid() { /** * Returns the primary "gid" (group ID), or {@code -1} if it could not be retrieved. - * + * * @return The gid, or -1. */ public long getGid() { @@ -90,10 +90,10 @@ public long getGid() { /** * Returns all "gid" values (group IDs), or {@code null} if they could not be retrieved. - * + * * Note that this list may be incomplete (only the primary gid may be returned), but it is * guaranteed that the first one in the list is the primary gid as returned by {@link #getGid()}. - * + * * @return The gids, or null. */ public long[] getGids() { @@ -103,7 +103,7 @@ public long[] getGids() { /** * Returns the process' unique identifier, or {@code null} if no such identifier could be * retrieved. Note that all processes run by the same Java runtime may share the same UUID. - * + * * @return The UUID, or null. */ public UUID getUUID() { @@ -120,7 +120,7 @@ void setGids(long[] gids) { /** * Checks if neither of the possible peer credentials are set. - * + * * @return {@code true} if no credentials set. */ public boolean isEmpty() { @@ -201,10 +201,10 @@ public boolean equals(Object obj) { /** * Returns the {@link AFUNIXSocketCredentials} for the currently active remote session, or * {@code null} if it was not possible to retrieve these credentials. - * + * * NOTE: For now, only RMI remote sessions are supported (RemoteServer sessions during a remote * method invocation). - * + * * If you want to retrieve the peer credentials for an RMI server, see junixsocket-rmi's * RemotePeerInfo. * diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java index a59ea780d..3479ec8af 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java @@ -24,23 +24,23 @@ /** * Defines certain methods that all junixsocket AF_UNIX socket implementations share and extend * beyond the standard socket API. - * + * * The set of features include methods to support working with ancillary messages (such as file * descriptors) as well as socket credentials. - * + * * Keep in mind that the platform this code runs on may not support these features, and exceptions * may be thrown when not checking for the corresponding {@link AFUNIXSocketCapability} first. - * + * * @author Christian Kohlschütter */ public interface AFUNIXSocketExtensions extends AFSocketExtensions { /** * Retrieves an array of incoming {@link FileDescriptor}s that were sent as ancillary messages, * along with a call to {@link InputStream#read()}, etc. - * + * * NOTE: Another call to this method will not return the same file descriptors again (most likely, * an empty array will be returned). - * + * * @return The file descriptors, or an empty array if none were available. * @throws IOException if the operation fails. */ @@ -54,15 +54,15 @@ public interface AFUNIXSocketExtensions extends AFSocketExtensions { /** * Sets a list of {@link FileDescriptor}s that should be sent as an ancillary message along with * the next write. - * + * * Important: There can only be one set of file descriptors active until the write completes. The * socket also needs to be connected for this operation to succeed. - * + * * It is also important to know that there may be an upper limit imposed by the operation system * as to how many file descriptors can be sent at once. Linux, for example, may support up to 253. * If the number of file descriptors exceeds the limit, an exception may be thrown when sending * data along with the ancillary message containing the file descriptors. - * + * * @param fdescs The file descriptors, or {@code null} if none. * @throws IOException if the operation fails. */ @@ -71,7 +71,7 @@ public interface AFUNIXSocketExtensions extends AFSocketExtensions { /** * Returns {@code true} if there are pending file descriptors to be sent as part of an ancillary * message. - * + * * @return {@code true} if there are file descriptors pending. */ boolean hasOutboundFileDescriptors(); @@ -80,7 +80,7 @@ public interface AFUNIXSocketExtensions extends AFSocketExtensions { * Retrieves the "peer credentials" for this connection. * * These credentials may be useful to authenticate the other end of the socket (client or server). - * + * * Depending on the socket/connection/environment, you may not receive any or all credentials. For * example, on Linux, {@link AFUNIXDatagramSocket} and {@link AFUNIXDatagramChannel} may not be * able to retrieve credentials at all. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java index 3ac279104..39938295d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java @@ -28,10 +28,10 @@ /** * The base for a SocketFactory that connects to UNIX sockets. - * + * * Typically, the "hostname" is used as a reference to a socketFile on the file system. The actual * mapping is left to the implementor. - * + * * @see AFUNIXSocketFactory.FactoryArg * @see AFUNIXSocketFactory.SystemProperty * @see AFUNIXSocketFactory.URIScheme @@ -83,9 +83,9 @@ private static String getDefaultSocketHostname() { * A socket factory that handles a custom hostname ("localhost", by default, and configured by the * system property "org.newsclub.net.unix.socket.hostname"), forwarding all other * requests to the fallback {@link SocketFactory}. - * + * * The socket path is configured through an argument passed by to the constructor. - * + * * This is particularly useful for JDBC drivers that take a "socketFactory" and a * "socketFactoryArg". The latter will be passed as a constructor argument. */ @@ -94,7 +94,7 @@ public static final class FactoryArg extends DefaultSocketHostnameSocketFactory /** * Constructs a new {@link FactoryArg} factory using the given socket path. - * + * * @param socketPath The path to the socket. */ public FactoryArg(String socketPath) { @@ -106,7 +106,7 @@ public FactoryArg(String socketPath) { /** * Constructs a new {@link FactoryArg} factory using the given socket path. - * + * * @param file The path to the socket. */ public FactoryArg(File file) { @@ -126,10 +126,10 @@ public AFUNIXSocketAddress addressFromHost(String host, int port) throws SocketE * A socket factory that handles a custom hostname ("junixsocket.localhost", by default, and * configured by the system property "org.newsclub.net.unix.socket.hostname"), * forwarding all other requests to the fallback {@link SocketFactory}. - * + * * The socket path is configured through a system property, * "org.newsclub.net.unix.socket.default". - * + * * NOTE: While it is technically possible, it is highly discouraged to programmatically change the * value of the property as it can lead to concurrency issues and undefined behavior. */ @@ -157,12 +157,12 @@ public AFUNIXSocketAddress addressFromHost(String host, int port) throws SocketE /** * A socket factory that handles special host names formatted as file:// URIs. - * + * * The file:// URI may also be specified in URL-encoded format, i.e., file:%3A%2F%2F etc. - * + * * You may also surround the URL with square brackets ("[" and "]"), whereas the closing bracket * may be omitted. - * + * * NOTE: In some circumstances it is recommended to use "[file:%3A%2F%2F(...)", i.e. * encoded and without the closing bracket. Since this is an invalid hostname, it will not trigger * a DNS lookup, but can still be used within a JDBC Connection URL. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java index 35934871b..12ae2ac1d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java @@ -29,7 +29,7 @@ protected AFUNIXSocketImpl(FileDescriptor fdObj) throws SocketException { /** * Changes the behavior to be somewhat lenient with respect to the specification. - * + * * In particular, we ignore calls to {@link Socket#getTcpNoDelay()} and * {@link Socket#setTcpNoDelay(boolean)}. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java index 08e22cbee..68413018d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java @@ -21,7 +21,7 @@ /** * A pair of sockets. - * + * * @param The socket type. * @author Christian Kohlschütter */ @@ -32,7 +32,7 @@ public final class AFUNIXSocketPair extends AFSocketPair /** * Opens a socket pair of interconnected channels. - * + * * @return The new channel pair. * @throws IOException on error. */ @@ -42,7 +42,7 @@ public static AFUNIXSocketPair open() throws IOException { /** * Opens a socket pair of interconnected datagram channels. - * + * * @return The new channel pair. * @throws IOException on error. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java index a9c8012e0..9929ba485 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java @@ -35,7 +35,7 @@ /** * An {@link AFSocketAddress} for VSOCK sockets. - * + * * @author Christian Kohlschütter */ public final class AFVSOCKSocketAddress extends AFSocketAddress { @@ -104,7 +104,7 @@ public static AFVSOCKSocketAddress ofHypervisorPort(int port) throws SocketExcep /** * Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any" * port on the hypervisor; the "java port" is set to -1. - * + * * @return A corresponding {@link AFVSOCKSocketAddress} instance. * @throws SocketException if the operation fails. */ @@ -115,7 +115,7 @@ public static AFVSOCKSocketAddress ofAnyHypervisorPort() throws SocketException /** * Returns an {@link AFVSOCKSocketAddress} that refers to the given port with the local/loopback * CID; the "java port" is set to -1. - * + * * @param port The VSOCK port. * @return A corresponding {@link AFVSOCKSocketAddress} instance. * @throws SocketException if the operation fails. @@ -127,7 +127,7 @@ public static AFVSOCKSocketAddress ofLocalPort(int port) throws SocketException /** * Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any" * port with the local/loopback CID; the "java port" is set to -1. - * + * * @return A corresponding {@link AFVSOCKSocketAddress} instance. * @throws SocketException if the operation fails. */ @@ -150,7 +150,7 @@ public static AFVSOCKSocketAddress ofHostPort(int port) throws SocketException { /** * Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any" * port on the host; the "java port" is set to -1. - * + * * @return A corresponding {@link AFVSOCKSocketAddress} instance. * @throws SocketException if the operation fails. */ @@ -161,7 +161,7 @@ public static AFVSOCKSocketAddress ofAnyHostPort() throws SocketException { /** * Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any" * port and CID; the "java port" is set to -1. - * + * * @return A corresponding {@link AFVSOCKSocketAddress} instance. * @throws SocketException if the operation fails. */ @@ -172,7 +172,7 @@ public static AFVSOCKSocketAddress ofAnyPort() throws SocketException { /** * Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to the * given port with "any CID"; the "java port" is set to -1. - * + * * @param port The VSOCK port. * @return A corresponding {@link AFVSOCKSocketAddress} instance. * @throws SocketException if the operation fails. @@ -198,7 +198,7 @@ public static AFVSOCKSocketAddress ofPortAndCID(int javaPort, int vsockPort, int /** * Returns an {@link AFVSOCKSocketAddress} given a special {@link InetAddress} that encodes the * byte sequence of an AF_VSOCK socket address, like those returned by {@link #wrapAddress()}. - * + * * @param address The "special" {@link InetAddress}. * @param port The port (use 0 for "none"). * @return The {@link AFVSOCKSocketAddress} instance. @@ -213,7 +213,7 @@ public static AFVSOCKSocketAddress unwrap(InetAddress address, int port) throws * Returns an {@link AFVSOCKSocketAddress} given a special {@link InetAddress} hostname that * encodes the byte sequence of an AF_VSOCK socket address, like those returned by * {@link #wrapAddress()}. - * + * * @param hostname The "special" hostname, as provided by {@link InetAddress#getHostName()}. * @param port The port (use 0 for "none"). * @return The {@link AFVSOCKSocketAddress} instance. @@ -226,7 +226,7 @@ public static AFVSOCKSocketAddress unwrap(String hostname, int port) throws Sock /** * Returns an {@link AFVSOCKSocketAddress} given a generic {@link SocketAddress}. - * + * * @param address The address to unwrap. * @return The {@link AFVSOCKSocketAddress} instance. * @throws SocketException if the operation fails, for example when an unsupported address is @@ -242,7 +242,7 @@ public static AFVSOCKSocketAddress unwrap(SocketAddress address) throws SocketEx /** * Returns the "VSOCK port" part of this address. - * + * * @return The VSOCK port identifier * @see #getPort() */ @@ -254,7 +254,7 @@ public int getVSOCKPort() { /** * Returns the "VSOCK CID" part of this address. - * + * * @return The VSOCK CID identifier. */ public int getVSOCKCID() { @@ -265,7 +265,7 @@ public int getVSOCKCID() { /** * Returns the "VSOCK reserved1" part of this address. - * + * * @return The "reserved1" identifier, which should be 0. */ public int getVSOCKReserved1() { @@ -313,7 +313,7 @@ public File getFile() throws FileNotFoundException { /** * Checks if an {@link InetAddress} can be unwrapped to an {@link AFVSOCKSocketAddress}. - * + * * @param addr The instance to check. * @return {@code true} if so. * @see #wrapAddress() @@ -325,7 +325,7 @@ public static boolean isSupportedAddress(InetAddress addr) { /** * Checks if a {@link SocketAddress} can be unwrapped to an {@link AFVSOCKSocketAddress}. - * + * * @param addr The instance to check. * @return {@code true} if so. * @see #unwrap(InetAddress, int) @@ -345,7 +345,7 @@ private static byte[] toBytes(int port, int cid) { /** * Returns the corresponding {@link AFAddressFamily}. - * + * * @return The address family instance. */ @SuppressWarnings("null") @@ -385,7 +385,7 @@ protected Set uriSchemes() { /** * Returns an {@link AFVSOCKSocketAddress} for the given URI, if possible. - * + * * @param uri The URI. * @return The address. * @throws SocketException if the operation fails. @@ -397,7 +397,7 @@ public static AFVSOCKSocketAddress of(URI uri) throws SocketException { /** * Returns an {@link AFVSOCKSocketAddress} for the given URI, if possible. - * + * * @param uri The URI. * @param overridePort The port to forcibly use, or {@code -1} for "don't override". * @return The address. @@ -551,13 +551,13 @@ private static int parseInt(String v) { /** * Checks if the given address could cover another address. - * + * * By default, this is only true if both addresses are regarded equal using * {@link #equals(Object)}. - * + * * However, implementations may support "wildcard" addresses, and this method would compare a * wildcard address against some non-wildcard address, for example. - * + * * @param covered The other address that could be covered by this address. * @return {@code true} if the other address could be covered. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java index fc7b65e66..57a597f94 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java @@ -22,7 +22,7 @@ /** * VSOCK-specific code that resides in the native library. To be used by {@code AFVSOCKSocket} and * {@code AFVSOCKDatagramSocket} only. - * + * * @author Christian Kohlschütter */ public final class AFVSOCKSocketImplExtensions implements @@ -36,12 +36,12 @@ public final class AFVSOCKSocketImplExtensions implements /** * Returns the local CID. - * + * * If the system does not support vsock, or status about support cannot be retrieved, -1 * ({@link AFVSOCKSocketAddress#VMADDR_CID_ANY}) is returned. - * + * * The value may be cached upon initialization of the library. - * + * * @return The CID, or -1. * @throws IOException on error. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java index c892bcd13..9d3faa2a6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java @@ -22,7 +22,7 @@ /** * A {@link SocketException} that may be thrown upon some "address unavailable" condition from * native code (e.g., EADDRNOTAVAIL is returned). - * + * * @author Christian Kohlschütter */ public class AddressUnavailableSocketException extends InvalidSocketException { @@ -37,7 +37,7 @@ public AddressUnavailableSocketException() { /** * Constructs a new {@link AddressUnavailableSocketException}. - * + * * @param msg The error message. */ public AddressUnavailableSocketException(String msg) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java index 55973cb62..91969d10c 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java @@ -21,7 +21,7 @@ /** * A {@link SocketException} indicating that a socket connection was broken ("broken pipe"). - * + * * @author Christian Kohlschütter */ public final class BrokenPipeSocketException extends SocketException { @@ -36,7 +36,7 @@ public BrokenPipeSocketException() { /** * Constructs a new {@link BrokenPipeSocketException}. - * + * * @param msg The error message. */ public BrokenPipeSocketException(String msg) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java index e77bfe952..de7e8d68f 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java @@ -24,7 +24,7 @@ /** * This wrapper (along with the Java 8-specific counterpart in src/main/java8) allows us to * implement cleanup logic for objects that are garbage-collectable/no longer reachable. - * + * *

    * Usage: *

      @@ -46,7 +46,7 @@ *
    1. In Java 8 or earlier, {@link #finalize()} calls {@link #doClean()} directly.
    2. *
*

- * + * * @author Christian Kohlschütter */ abstract class CleanableState implements Closeable { @@ -56,7 +56,7 @@ abstract class CleanableState implements Closeable { /** * Creates a state object to be used as an implementation detail of the specified observed * instance. - * + * * @param observed The observed instance (the outer class referencing this * {@link CleanableState}). */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java index 557c1eb97..cbaedc1f4 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java @@ -25,7 +25,7 @@ /** * A pair of two closeable items. - * + * * @param The type of the items. * @author Christian Kohlschütter */ @@ -36,7 +36,7 @@ public class CloseablePair implements Closeable { /** * Creates a pair of two items. - * + * * @param a The first item. * @param b The second item. */ @@ -46,7 +46,7 @@ public CloseablePair(T a, T b) { /** * Creates a pair of two items. - * + * * @param a The first item. * @param b The second item. * @param alsoClose Some closeable that is also closed upon {@link #close()}, or {@code null}. @@ -70,7 +70,7 @@ public final void close() throws IOException { /** * Returns the pair's first item. - * + * * @return The first item. */ public final @NonNull T getFirst() { @@ -79,7 +79,7 @@ public final void close() throws IOException { /** * Returns the pair's second item. - * + * * @return The second item. */ public final @NonNull T getSecond() { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java index c2c3be5a9..5f70cc0f1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java @@ -26,7 +26,7 @@ /** * A set of {@link Closeables} that can be closed at once. - * + * * @author Christian Kohlschütter */ public final class Closeables implements Closeable { @@ -41,7 +41,7 @@ public Closeables() { /** * Creates a new {@link Closeables} instance, populating it with the given {@link Closeable} * objects. - * + * * @param closeable The {@link Closeable}s to add. */ public Closeables(Closeable... closeable) { @@ -57,7 +57,7 @@ public void close() throws IOException { /** * Closes all registered closeables. - * + * * @param superException If set, any exceptions thrown in here will be chained to the given * exception via addSuppressed, and then thrown. * @throws IOException if an exception occurs. @@ -106,7 +106,7 @@ public V get() { /** * Adds the given closeable, but only using a weak reference. - * + * * @param closeable The closeable. * @return {@code true} iff the closeable was added, {@code false} if it was {@code null} or * already added before. @@ -133,7 +133,7 @@ public synchronized boolean add(WeakReference closeable) { /** * Adds the given closeable. - * + * * @param closeable The closeable. * @return {@code true} iff the closeable was added, {@code false} if it was {@code null} or * already added before. @@ -144,7 +144,7 @@ public synchronized boolean add(Closeable closeable) { /** * Removes the given closeable. - * + * * @param closeable The closeable. * @return {@code true} iff the closeable was removed, {@code fale} if it was {@code null} or not * previously added. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java index 6ee295499..7cbda33eb 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java @@ -24,7 +24,7 @@ /** * A shim that is filled with Java version-specific overrides. This variant is for Java 9 and above. - * + * * @author Christian Kohlschütter */ abstract class DatagramSocketImplShim extends DatagramSocketImpl { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java index 15f5da800..0298c35b3 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java @@ -22,13 +22,13 @@ /** * Something that has a {@link FileDescriptor}. - * + * * @author Christian Kohlschütter */ public interface FileDescriptorAccess { /** * Returns the corresponding {@link FileDescriptor}. - * + * * @return The corresponding {@link FileDescriptor}. * @throws IOException on error. */ diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java index 993634cff..e9d7b3508 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java @@ -46,16 +46,16 @@ *

*

  * FileDescriptor fd;
- * 
+ *
  * // succeeds if fd refers to an AF_UNIX stream socket
- * AFUNIXSocket socket = FileDescriptorCast.using(fd).as(AFUNIXSocket.class); 
- * 
+ * AFUNIXSocket socket = FileDescriptorCast.using(fd).as(AFUNIXSocket.class);
+ *
  * // succeeds if fd refers to an AF_UNIX datagram socket
- * AFUNIXDatagramChannel channel = FileDescriptorCast.using(fd).as(AFUNIXDatagramChannel.class); 
- * 
+ * AFUNIXDatagramChannel channel = FileDescriptorCast.using(fd).as(AFUNIXDatagramChannel.class);
+ *
  * // always succeeds
- * InputStream in = FileDescriptorCast.using(fd).as(InputStream.class); 
- * OutputStream in = FileDescriptorCast.using(fd).as(OutputStream.class); 
+ * InputStream in = FileDescriptorCast.using(fd).as(InputStream.class);
+ * OutputStream in = FileDescriptorCast.using(fd).as(OutputStream.class);
  * 
*

* IMPORTANT: On some platforms (e.g., Solaris, Illumos) you may need to re-apply a read timeout @@ -66,7 +66,7 @@ * that do not encode this information directly (such as {@link AFUNIXSocketAddress} and * {@link AFTIPCSocketAddress}). *

- * + * * @author Christian Kohlschütter */ public final class FileDescriptorCast implements FileDescriptorAccess { @@ -269,7 +269,7 @@ private interface CastingProvider { /** * Creates a {@link FileDescriptorCast} using the given file descriptor. - * + * * @param fdObj The file descriptor. * @return The {@link FileDescriptorCast} instance. * @throws IOException on error, especially if the given file descriptor is invalid or @@ -297,10 +297,10 @@ private static void triggerInit() { /** * Registers the given port number as the "local port" for this file descriptor. - * + * * Important: This only changes the state of this instance. The actual file descriptor is not * affected. - * + * * @param port The port to assign to (must be >= 0). * @return This instance. */ @@ -314,10 +314,10 @@ public FileDescriptorCast withLocalPort(int port) { /** * Registers the given port number as the "remote port" for this file descriptor. - * + * * Important: This only changes the state of this instance. The actual file descriptor is not * affected. - * + * * @param port The port to assign to (must be >= 0). * @return This instance. */ @@ -331,7 +331,7 @@ public FileDescriptorCast withRemotePort(int port) { /** * Casts this instance to the desired type. - * + * * @param The desired type. * @param desiredType The class of the desired type. * @return s An instance of the desired type. @@ -356,7 +356,7 @@ public FileDescriptorCast withRemotePort(int port) { /** * Checks if the instance can be cast as the given desired type (using {@link #as(Class)}). - * + * * @param desiredType The class of the desired type. * @return {@code true} if the cast can be made. * @throws IOException on error. @@ -369,7 +369,7 @@ public boolean isAvailable(Class desiredType) throws IOException { /** * Returns a collection of available types this instance can be cast to (using * {@link #as(Class)}). - * + * * @return The collection of available types. */ public Set> availableTypes() { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java index ba1782759..5f8fb4921 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java @@ -28,7 +28,7 @@ /** * Hostname and port. - * + * * @author Christian Kohlschütter */ public final class HostAndPort { @@ -39,7 +39,7 @@ public final class HostAndPort { /** * Creates a new hostname and port combination. - * + * * @param hostname The hostname. * @param port The port, or {@code -1} for "no port". */ @@ -88,7 +88,7 @@ public String toString() { /** * Tries to extract hostname and port information from the given URI. - * + * * @param u The URI to extract from. * @return The parsed {@link HostAndPort} instance. * @throws SocketException on error. @@ -130,7 +130,7 @@ private static String urlEncode(String s) { /** * Returns the hostname. - * + * * @return The hostname. */ public String getHostname() { @@ -139,7 +139,7 @@ public String getHostname() { /** * Returns the port, or {@code -1} for "no port specified". - * + * * @return The port. */ public int getPort() { @@ -148,7 +148,7 @@ public int getPort() { /** * Returns a URI with this hostname and port. - * + * * @param scheme The scheme to use. * @return The URI. */ @@ -159,7 +159,7 @@ public URI toURI(String scheme) { /** * Returns a URI with this hostname and port, potentially reusing other URI parameters from the * given template URI (authority, path, query, fragment). - * + * * @param scheme The scheme to use. * @param template The template. or {@code null}. * @return The URI. @@ -192,7 +192,7 @@ public URI toURI(String scheme, URI template) { /** * Returns a URI with this hostname and port, potentially using other URI parameters from the * given set of parameters. - * + * * @param scheme The scheme to use. * @param rawAuthority The raw authority field, or {@code null}. * @param rawPath The raw path field, or {@code null}. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java index b644cfc37..6860dbf8a 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java @@ -22,7 +22,7 @@ /** * A {@link SocketException} that may be thrown upon some "invalid argument" being passed into * native code (i.e., EINVAL is returned). - * + * * @author Christian Kohlschütter */ public class InvalidArgumentSocketException extends InvalidSocketException { @@ -37,7 +37,7 @@ public InvalidArgumentSocketException() { /** * Constructs a new {@link InvalidArgumentSocketException}. - * + * * @param msg The error message. */ public InvalidArgumentSocketException(String msg) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java index c1aaa8ab8..b4381ca18 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java @@ -22,7 +22,7 @@ /** * A {@link SocketException} that may be thrown upon some "invalid" state, mostly detected in native * code. - * + * * @author Christian Kohlschütter * @see InvalidArgumentSocketException * @see AddressUnavailableSocketException @@ -40,7 +40,7 @@ public InvalidSocketException() { /** * Constructs a new {@link InvalidSocketException}. - * + * * @param msg The error message. */ public InvalidSocketException(String msg) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java index 647a32914..aca83ba73 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java @@ -27,9 +27,9 @@ /** * A "named integer", usually used for constants. - * + * * See the concrete implementations for usage. - * + * * @author Christian Kohlschütter */ @NonNullByDefault @@ -57,7 +57,7 @@ public interface HasOfValue { /** * Creates a new {@link NamedInteger} instance, without actually naming it. A name of "UNDEFINED" * is used. - * + * * @param id The value. */ protected NamedInteger(int id) { @@ -66,7 +66,7 @@ protected NamedInteger(int id) { /** * Creates a new {@link NamedInteger} instance. - * + * * @param name The name. * @param id The value. */ @@ -77,7 +77,7 @@ protected NamedInteger(String name, int id) { /** * Returns the name. - * + * * @return The name. */ public final String name() { @@ -86,7 +86,7 @@ public final String name() { /** * Returns the value. - * + * * @return The value. */ public final int value() { @@ -118,7 +118,7 @@ public final boolean equals(@Nullable Object obj) { /** * Ensures that the {@code VALUES} array is configured correctly. - * + * * @param The instance type. * @param values The {@code VALUES} array. * @return The verified {@code VALUES} array. @@ -135,14 +135,14 @@ protected static final T[] init(T[] values) { /** * Constructor for "undefined" values. - * + * * @param The instance type. */ @FunctionalInterface protected interface UndefinedValueConstructor { /** * Creates a new "undefined" value instance. - * + * * @param id The value. * @return The instance. */ @@ -151,7 +151,7 @@ protected interface UndefinedValueConstructor { /** * Returns an instance given an integer value. - * + * * @param The instance type. * @param values The {@code VALUES} array. * @param constr The constructor for undefined values. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java index af525ded1..995ee41bf 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java @@ -28,7 +28,7 @@ /** * Describes a 32-bit bitmask that supports named flags. - * + * * @param The subclass's type itself. * @author Christian Kohlschütter */ @@ -49,7 +49,7 @@ public abstract class NamedIntegerBitmask> impl /** * Creates a new named flag. - * + * * @param name The name of the flag / flag set. * @param flags The flag value. */ @@ -60,7 +60,7 @@ protected NamedIntegerBitmask(@Nullable String name, int flags) { /** * Returns the name of the flag / flag set. - * + * * @return The name. */ public final String name() { @@ -69,7 +69,7 @@ public final String name() { /** * Returns the value of the flag / flag set. - * + * * @return The value. */ public final int value() { @@ -78,7 +78,7 @@ public final int value() { /** * Checks if the given flag is set. - * + * * @param flag The flag to check. * @return {@code true} iff set. */ @@ -95,7 +95,7 @@ public final String toString() { /** * Combines two flags / flag sets (use this to implement * {@link #combineWith(NamedIntegerBitmask)}). - * + * * @param allFlags The array of all defined flags, expected "none". * @param flagsNone The "none" flag set. * @param constr The constructor. @@ -109,7 +109,7 @@ protected final T combineWith(T[] allFlags, T flagsNone, Constructor constr, /** * Combines two flags / flag sets. - * + * * @param other The other flag / flag set. * @return An instance combining both. */ @@ -118,14 +118,14 @@ protected final T combineWith(T[] allFlags, T flagsNone, Constructor constr, /** * Creates a new instance. - * + * * @param This type. */ @FunctionalInterface protected interface Constructor> { /** * Creates a new instance. - * + * * @param name The name. * @param flags The flag value. * @return The instance. @@ -135,7 +135,7 @@ protected interface Constructor> { /** * Returns a {@link NamedIntegerBitmask} instance given a flag value. - * + * * @param The subclass's type itself. * @param allFlags The array of all defined flags, expected "none". * @param flagsNone The "none" flag set. @@ -167,7 +167,7 @@ protected static final > T resolve(T[] allFlags /** * Returns a {@link NamedIntegerBitmask} instance given a series of flags. - * + * * @param The subclass's type itself. * @param allFlags The array of all defined flags, expected "none". * @param flagsNone The "none" flag set. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java index eb225b1f6..d34af59fd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java @@ -56,7 +56,7 @@ final class NativeLibraryLoader implements Closeable { /** * Returns the temporary directory where the native library is extracted to; debugging only. - * + * * @return The temporary directory. */ static File tempDir() { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java index 18ef5de11..35372d43f 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java @@ -36,7 +36,7 @@ /** * JNI connector to native JNI C code. - * + * * @author Christian Kohlschütter */ final class NativeUnixSocket { @@ -161,7 +161,7 @@ static native boolean connect(ByteBuffer sockaddr, int sockaddrLen, FileDescript /** * Reads data from an {@link AFSocketImpl}. - * + * * @param fd The corresponding file descriptor. * @param buf The buffer to read into, or {@code null} if a single byte should be read. * @param off The buffer offset. @@ -177,7 +177,7 @@ static native int read(FileDescriptor fd, byte[] buf, int off, int len, int opti /** * Writes data to an {@link AFSocketImpl}. - * + * * @param fd The corresponding file descriptor. * @param buf The buffer to write from, or {@code null} if a single byte should be written. * @param off The buffer offset, or the byte to write if {@code buf} is {@code null}. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java index f97dce16c..4aa38a2e9 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java @@ -22,7 +22,7 @@ /** * A {@link SocketException} that may be thrown upon some "unsupported operation" condition from * native code (e.g., EOPNOTSUPP is returned). - * + * * @author Christian Kohlschütter */ public class OperationNotSupportedSocketException extends InvalidSocketException { @@ -37,7 +37,7 @@ public OperationNotSupportedSocketException() { /** * Constructs a new {@link OperationNotSupportedSocketException}. - * + * * @param msg The error message. */ public OperationNotSupportedSocketException(String msg) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java index 21b9b26ef..34c51cf57 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java @@ -27,7 +27,7 @@ /** * Hack to get a readable AND writable {@link FileChannel} for a {@link FileDescriptor}. - * + * * @author Christian Kohlschütter */ final class RAFChannelProvider extends RandomAccessFile implements FileDescriptorAccess { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java index 5c82039fa..6d469035c 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java @@ -23,7 +23,7 @@ /** * A filter that takes a {@link SocketAddress}, and potentially changes it, or throws an exception * if certain criteria are met. - * + * * @author Christian Kohlschütter */ @FunctionalInterface @@ -31,7 +31,7 @@ public interface SocketAddressFilter { /** * Applies the filter on the given address. - * + * * @param address The address. * @return The address itself or a changed address. * @throws IOException on error or if a certain error condition is desired. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java index afce7ad58..f701c2c0c 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java @@ -21,7 +21,7 @@ /** * A {@link SocketException} indicating that a socket was closed or is not open for other reasons. - * + * * @author Christian Kohlschütter */ public final class SocketClosedException extends SocketException { @@ -36,7 +36,7 @@ public SocketClosedException() { /** * Constructs a new {@link SocketClosedException}. - * + * * @param msg The error message. */ public SocketClosedException(String msg) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java index c5829ad7b..ec176ffdd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java @@ -21,7 +21,7 @@ /** * A shim that is filled with Java version-specific overrides. This variant is for Java 9 and above. - * + * * @author Christian Kohlschütter */ abstract class SocketImplShim extends SocketImpl { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java index ebc58ac13..07e701ef1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java @@ -28,7 +28,7 @@ /** * Maps new SocketOption classes to the old integer-based scheme. - * + * * @author Christian Kohlschütter */ final class SocketOptionsMapper { diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java index db1cf6755..b61087820 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java @@ -23,7 +23,7 @@ /** * Helper methods for datagrams, but mostly for testing. - * + * * @author Christian Kohlschütter */ public final class AFDatagramUtil { diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java index 4dddd1c3d..4353a4879 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java @@ -42,7 +42,7 @@ /** * Verifies that accept properly times out when an soTimeout was specified. - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings({ @@ -194,7 +194,7 @@ public void run() { /** * Subclasses may override this to tell that there is a known issue with "Accept timeout after * delay". - * + * * @param serverAddr The server address. * @return An explanation iff this should not cause a test failure but trigger "With issues". */ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java index 3e5d3a770..0f5f62db5 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java @@ -31,13 +31,13 @@ /** * Test-related methods to work with a particular {@link AFSocket} implementation. - * + * * It is essential to use these methods in tests instead of directly calling the {@link AFSocket} * etc. methods: Some socket implementations (and sometimes only in certain kernel/environment * configurations) may expose unexpected behavior that is otherwise hard to catch. - * + * * This is especially relevant when connecting/binding sockets. - * + * * @param
The socket address. * @author Christian Kohlschütter * @see SocketTestBase diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java index d40fdc774..fcbe9e3b9 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java @@ -36,7 +36,7 @@ /** * Tests breaking out of accept. - * + * * @see Issue 6 */ @SuppressFBWarnings({ @@ -139,7 +139,7 @@ protected ExceptionHandlingDecision handleException(Exception e) { /** * Subclasses may override this to tell that there is a known condition where an otherwise * expected SocketException is not thrown. - * + * * @return An explanation iff this should not cause a test failure but just add a notice. */ protected String checkKnownConditionDidNotThrowSocketException() { diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java index 37408db53..5c6d5f7cc 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java @@ -43,7 +43,7 @@ /** * See http://code.google.com/p/junixsocket/issues/detail?id=9 - * + * * @author Derrick Rice (April, 2010) */ @SuppressFBWarnings({ @@ -234,11 +234,11 @@ public void serverWriteToSocketClosedByClient() throws Exception { try { /* * http://www.unixguide.net/network/socketfaq/2.1.shtml http://www.faqs.org/rfcs/rfc793.html - * + * * The TCP RFC allows the open side to continue sending data. In most (all?) * implementations, the closed side will respond with a RST. For this reason, it takes two * writes to cause an IOException with TCP sockets. (or more, if there is latency) - * + * * However, it is expected that the write give an IOException as soon as possible - which * means it is OK for our socket implementation to give an IOException on the first write. */ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java index 03eab2f38..020a1dd2c 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java @@ -44,10 +44,10 @@ /** * This tests the issue reported in * issue 29. - * + * * We need to ensure that the native file descriptor is closed whenever our socket implementation is * garbage collected, even when {@link AFSocket#close()} is not called. - * + * * @author Christian Kohlschütter */ @CommandAvailabilityRequirement(commands = {"lsof"}) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java index 19673a531..10db902c0 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java @@ -25,9 +25,9 @@ /** * A potentially file descriptor-leaking client. - * + * * See issue 29 for details. - * + * * @see FinalizeTest * @author Christian Kohlschütter */ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java index 8a7b6e580..e88557a9f 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java @@ -38,7 +38,7 @@ /** * Tests the behavior of {@link AFPipe}. - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings("THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION") @@ -47,7 +47,7 @@ public final class PipeTest { /** * Tests sequential writing/reading. - * + * * @throws IOException on error. */ @Test @@ -78,7 +78,7 @@ public void testPipe() throws IOException { /** * Tests concurrent writing/reading from the pipe. - * + * * @throws IOException on error. * @throws InterruptedException on error. * @throws ExecutionException on error. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java index 35ec287a9..db2b9fdae 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java @@ -36,7 +36,7 @@ /** * Reads and writes data either using byte arrays or byte-for-byte (which may be implemented * differently). - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings({ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java index 9e67e4af0..9ab760e47 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java @@ -175,11 +175,11 @@ private Future newHelloClient(SocketAddress serverAddr, Semaphore sema) /** * Tests a non-blocking server setup where a client connects, sends "Hello" to the server and then * disconnects after the server has received the message. - * + * * In the selection loop, after the client has disconnected, the server should see that the * corresponding {@link SelectionKey} is "readable" (even if that means the connection was * closed). - * + * * @throws Exception on error. */ @Test @@ -193,7 +193,7 @@ public void testConnectionCloseEventualClientDisconnect() throws Exception { * * Unlike {@link #testConnectionCloseEventualClientDisconnect()}, this may uncover additional * faults, such as an unexpected exception when trying to read the socket name. - * + * * @throws Exception on error. */ @Test @@ -204,11 +204,11 @@ public void testConnectionCloseImmediateClientDisconnect() throws Exception { /** * Tests a non-blocking server setup where a client connects, sends "Hello" to the server and then * disconnects after the server has received the message. - * + * * In the selection loop, after the client has disconnected, the server should see that the * corresponding {@link SelectionKey} is "readable" (even if that means the connection was * closed). - * + * * @throws Exception on error. */ @Test @@ -222,7 +222,7 @@ public void testConnectionCloseEventualClientDisconnectKeepLooping() throws Exce * * Unlike {@link #testConnectionCloseEventualClientDisconnect()}, this may uncover additional * faults, such as an unexpected exception when trying to read the socket name. - * + * * @throws Exception on error. */ @Test diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java index bc0544efa..836cb2c25 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java @@ -21,7 +21,7 @@ /** * Some bridging code that allows junixsocket-selftest to do some in-depth diagnostics. - * + * * @author Christian Kohlschütter */ public final class SelftestDiagnosticsHelper { @@ -30,7 +30,7 @@ private SelftestDiagnosticsHelper() { /** * Returns the error that prevented the native library from loading, or {@code null}. - * + * * @return The error, or {@code null}. */ public static Throwable initError() { @@ -39,7 +39,7 @@ public static Throwable initError() { /** * Returns the temporary directory used for storing the native library, or {@code null}. - * + * * @return The directory, or {@code null}. */ public static File tempDir() { diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java index 0c8412221..a708736f2 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java @@ -27,7 +27,7 @@ /** * Provides references to all "junixsocket-common" tests that should be included in * junixsocket-selftest. - * + * * @author Christian Kohlschütter */ @SuppressWarnings("PMD.CouplingBetweenObjects") diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java index 66ec18760..049778ec3 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java @@ -34,7 +34,7 @@ /** * Tests some otherwise uncovered methods of {@link AFSocket}. - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings({ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java index 9f8b0b1b4..b4bd59c33 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java @@ -39,7 +39,7 @@ /** * Tests {@link Socket#setSoTimeout(int)} behavior. - * + * * @see Issue 14 */ @SuppressFBWarnings({ @@ -52,7 +52,7 @@ protected SoTimeoutTest(AddressSpecifics asp) { /** * Triggers a case where {@link Socket#setSoTimeout(int)} fails on some platforms: when the socket * is closed. - * + * * @throws IOException on error. */ @Test @@ -82,7 +82,7 @@ protected void handleConnection(final Socket socket) throws IOException { /** * Triggers a regular case where {@link Socket#setSoTimeout(int)} should work. - * + * * @throws IOException on error. */ @Test diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java index fb4dea1d4..822c10af9 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java @@ -230,7 +230,7 @@ private void testDoubleBind(boolean reuseAddress) throws Exception { /** * Subclasses may override this to tell that there is a known issue with "First accept call did * not terminate". - * + * * @return An explanation iff this should not cause a test failure but trigger "With issues". */ protected String checkKnownBugFirstAcceptCallNotTerminated() { @@ -239,9 +239,9 @@ protected String checkKnownBugFirstAcceptCallNotTerminated() { /** * Returns the temporary address usable to binding on for a second bind. - * + * * Depending on the socket domain, a wildcard address may be permittable or not for a second bind. - * + * * @param originalAddress The original temporary address (e.g., a wildcard address). * @param ssc The socket that was bound to that address. * @return The local bound address, or the {@code originalAddress}. @@ -256,7 +256,7 @@ protected SocketAddress resolveAddressForSecondBind(SocketAddress originalAddres /** * Override to declare that a certain socket domain permits double-binding an address, * particularly when the address is comparable to a wildcard address. - * + * * @return {@code true} iff double-binding the same address is allowed. * @see #testDoubleBindAddressReusable() */ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java index 2044a0d42..12fb61fe8 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java @@ -35,7 +35,7 @@ /** * Tests some otherwise uncovered methods of {@link AFSocket}. - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings({ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java index df703241b..7e4b1af8d 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java @@ -48,17 +48,17 @@ /** * Some base functionality for socket tests. - * + * * This class provides access to the {@link AddressSpecifics} methods for the socket implementation * under test. It is essential to use these wrapper methods in tests instead of directly calling the * {@link AFSocket} etc. methods: Some socket implementations (and sometimes only in certain * kernel/environment configurations) may expose unexpected behavior that is otherwise hard to * catch. - * + * * This is especially relevant when connecting/binding sockets (see * {@link #connectSocket(Socket, SocketAddress)}, #bindServerSocket(ServerSocket, SocketAddress)}, * etc.) - * + * * @author Christian Kohlschuetter */ @SuppressWarnings("PMD.AbstractClassWithoutAbstractMethod") @@ -145,9 +145,9 @@ protected ServerSocket startServer() throws IOException { /** * Checks if an optional connection check via {@link AFSocket#checkConnectionClosed()}, is to be * run upon {@link AFServerSocket#accept()}. - * + * * Override to enable. - * + * * @return {@code true} if enabled; default is {@code false} = disabled. */ protected boolean shouldDoConnectionCheckUponAccept() { @@ -188,7 +188,7 @@ public void close() throws Exception { /** * Stops the server. - * + * * @throws IOException on error. */ public void shutdown() throws IOException { @@ -201,11 +201,11 @@ public void shutdown() throws IOException { /** * Callback used to handle a connection call. - * + * * After returning from this call, the socket is closed. - * + * * Use {@link #stopAcceptingConnections()} to stop accepting new calls. - * + * * @param sock The socket to handle. * @throws IOException upon error. */ @@ -214,9 +214,9 @@ public void shutdown() throws IOException { /** * Called from within {@link #handleConnection(Socket)} to tell the server to no longer accept * new calls and to terminate the server thread. - * + * * Note that this will lead to existing client connections to be closed. - * + * * If you want to deny new connections but finish your work on the client side (in another * thread), then please use semaphores etc. to ensure reaching a safe state before calling this * method. @@ -231,7 +231,7 @@ protected void onServerSocketClose() { /** * Returns the server socket. - * + * * @return the server socket. */ @SuppressFBWarnings("EI_EXPOSE_REP") @@ -241,7 +241,7 @@ public ServerSocket getServerSocket() { /** * Returns the server's address to connect to. - * + * * @return the address. */ public SocketAddress getServerAddress() { @@ -250,7 +250,7 @@ public SocketAddress getServerAddress() { /** * Called upon receiving an exception that may be handled specifically. - * + * * @param e The exception * @return {@link ExceptionHandlingDecision#RAISE} if we should handle the exception somehow, * {@link ExceptionHandlingDecision#IGNORE} if we should pretend the exception never @@ -326,9 +326,9 @@ protected void onServerReady() { /** * Checks if there were any exceptions thrown during the lifetime of this ServerThread. - * + * * NOTE: This call blocks until the Thread actually terminates. - * + * * @throws Exception upon error. */ public void checkException() throws Exception { @@ -360,7 +360,7 @@ protected final void handleConnection(Socket sock) throws IOException { /** * Sleeps for the given amount of milliseconds. - * + * * @param ms The duration in milliseconds. * @throws InterruptedIOException when interrupted. */ @@ -466,7 +466,7 @@ protected Random getRandom() { * Returns the Linux kernel's major and minor version as an integer array (i.e., {@code 5.10.2 -> * int[]{5,10}}), or {@code null} if the running system isn't Linux or the version could not be * determined. - * + * * @return The running Linux kernels' major and minor version as an integer array, or * {@code null}. */ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java index 4ed2fc770..bd97bae9d 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java @@ -47,7 +47,7 @@ /** * Tests the {@code Socket#getOption(SocketOption)} API available since Java 9. - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings({ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java index 060e258ab..85cb7f9ba 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java @@ -26,7 +26,7 @@ /** * This test app responds with "Hello world" over a {@link Socket} that was passed from another * process via standard input. - * + * * @author Christian Kohlschütter * @see org.newsclub.net.unix.domain.FileDescriptorCastTest#testForkedVMRedirectStdin() */ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java index 0647d9577..f684b0c72 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java @@ -346,7 +346,7 @@ public void testDatagramFileChannel() throws Exception { /** * Passes a socket to a newly created Java process as "standard input". The new process sends back * "Hello world" over that socket. - * + * * @throws Exception on failure. * @see StdinSocketApp */ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java index bc548aa60..3bd415073 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java @@ -54,7 +54,7 @@ /** * Tests sending and receiving file descriptors. - * + * * @author Christian Kohlschütter */ @AFSocketCapabilityRequirement({ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java index 8f7dc4dec..3bd8effc0 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java @@ -45,7 +45,7 @@ /** * Verifies that peer credentials are properly set. - * + * * @author Christian Kohlschütter */ @AFSocketCapabilityRequirement({ diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java index 4405a8f6c..ef68247df 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java @@ -34,7 +34,7 @@ /** * Tests some otherwise uncovered methods of {@link AFUNIXSocket}. - * + * * @author Christian Kohlschütter */ @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DOMAIN) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java index d02485871..813d7a833 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java @@ -26,10 +26,10 @@ /** * Flags a test that requires the Java Internet stack to function as expected. - * + * * This currently checks if we can bind to an unspecified (0) port on the loopback device, which * unfortunately may not always succeed. In the failure case, the annotated tests will be skipped. - * + * * @author Christian Kohlschütter */ @Target({ElementType.TYPE, ElementType.METHOD}) diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java index a91d97440..68a5b7ee7 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java @@ -31,7 +31,7 @@ /** * Demonstrates how to connect to a local MySQL server. - * + * * @author Christian Kohlschuetter */ public class AFUNIXDatabaseSocketFactoryDemo { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java index 50ca192f9..00c7d309e 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java @@ -45,7 +45,7 @@ private DemoHelper() { /** * Adds a key-value pair to a Properties instance. Takes values from a given system property and * overrides the default value with it. - * + * * @param props The Properties instance to write to. * @param key The name of the property. * @param defaultValue The default value (for demo purposes) diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java index 694577593..2502e871e 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java @@ -30,12 +30,12 @@ /** * A simple demo client. - * + * * Reads a server greeting string, then sends a "Hello Server" string as a response. - * + * * Finally, reads integers (via {@link DataInputStream}), then sends twice the sent value each, * unless a "-123" magic number is read to indicate the end of the conversation. - * + * * @author Christian Kohlschütter * @see SimpleTestServer */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java index 9d80664ce..dc32ad83a 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java @@ -31,13 +31,13 @@ /** * A simple demo server. - * + * * Sends a hello message (as a string), then reads back a response string. - * + * * Finally, sends integers (via {@link DataOutputStream}) from 1 to 5, expects an integer response * of twice the sent value each, then sends a "-123" magic number to indicate the end of the * conversation. - * + * * @author Christian Kohlschütter * @see SimpleTestClient */ @@ -56,18 +56,18 @@ public static void main(String[] args) throws IOException { try (AFUNIXServerSocket server = AFUNIXServerSocket.newInstance()) { /* * Uncomment the code below to change the bind behavior: - * + * * By default ("reuseAddress" is true), attempting to bind while another server is running on * the same address will cause the first server to terminate, and the new server will take * over the address. Depending on the operating system, this may involve connecting to the * first server in order to "wake up" the accept call. - * + * * In this demo code, we use AFSocket.getConnectionStatus to see if the accepted connection is * alive by sending - * + * * When "reuseAddress" is false, attempting to bind while another server is running won't * disrupt the first connection. The second bind will throw a SocketException instead. - * + * * NOTE: "reuseAddress=true" may not yet be supported on certain operating systems, such as * IBM i and z/OS. On these platforms, the behavior is as if "reuseAddress=false". Please * reach out by filing an issue on https://github.com/kohlschutter/junixsocket/issues if this diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java index 7faf9b515..e9d8e29e2 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java @@ -25,7 +25,7 @@ /** * A demo program to configure and run several {@link AFSocket} client demos from the command line. - * + * * @author Christian Kohlschütter */ public final class DemoClient { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java index 886406806..661e345b0 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java @@ -26,7 +26,7 @@ /** * An {@link AFUNIXSocket} client that's just good for demo purposes. - * + * * @author Christian Kohlschütter */ abstract class DemoClientBase { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java index da854ab74..f889e90d2 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java @@ -32,7 +32,7 @@ /** * Demonstrates how to connect to a local PostgreSQL server via unix sockets. - * + * * @author Christian Kohlschuetter * @see AFUNIXSocketFactory */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java index 133953cdb..c4bb840e2 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java @@ -32,9 +32,9 @@ /** * Creates a {@link NanoHTTPD} server, bound to {@code /tmp/junixsocket-http-server.sock}. - * + * * Http requests on that socket should return "Hello world from <hostname>". - * + * * @author Christian Kohlschütter * @see OkHttpClientDemo */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java index 4d4086b1d..8f20d0b3c 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java @@ -38,9 +38,9 @@ /** * Connects to {@code /tmp/junixsocket-http-server.sock} and performs an http request over that * socket, using the OkHttp HTTP client library. - * + * * If that socket is bound by {@link NanoHttpdServerDemo}, the expected output is "Hello world". - * + * * @author Christian Kohlschütter * @see NanoHttpdServerDemo */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java index 1e1f9d8d6..2d7dd1be3 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java @@ -39,10 +39,10 @@ /** * Connects to TIPC service 8080.1 and performs an HTTP request over that socket, using the * OkHttp HTTP client library. - * + * * If that socket is bound by {@link NanoHttpdServerDemo}, the expected output is "Hello world from * <hostname>" (start {@link NanoHttpdServerDemo} with {@code --url tipc://8080.1}. - * + * * @author Christian Kohlschütter * @see NanoHttpdServerDemo */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java index 6e3d12d3c..b12a15b26 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java @@ -29,7 +29,7 @@ /** * The implementation of the very simple {@link HelloWorld} service. - * + * * @author Christian Kohlschütter */ public class HelloWorldImpl implements HelloWorld { @@ -37,7 +37,7 @@ public class HelloWorldImpl implements HelloWorld { /** * Creates a new {@link HelloWorld} implementation. - * + * * @param naming The naming instance to use. */ @SuppressFBWarnings("EI_EXPOSE_REP") diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java index aef5a3a6a..7ed02962d 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java @@ -28,7 +28,7 @@ /** * A simple RMI client. Locates the RMI registry via AF_UNIX sockets and calls * {@link HelloWorld#hello()}. - * + * * @author Christian Kohlschütter */ public final class SimpleRMIClient { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java index 082856410..190ee6586 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java @@ -30,7 +30,7 @@ /** * A simple RMI client. Locates the RMI registry via AF_UNIX sockets and calls * {@link HelloWorld#hello()}. - * + * * @author Christian Kohlschütter */ public final class SimpleRMIClientActingAsServer { @@ -59,14 +59,14 @@ public static void main(String[] args) throws IOException, NotBoundException { /** * Uncommenting the line below keeps this instance running. - * + * * Try it and run SimpleRMIClient to see the difference. */ naming.unexportAndUnbind("world", world); /** * Also try to remotely shut down the registry. - * + * * This will not succeed if the server set {@code naming.setRemoteShutdownAllowed(false)}. See * {@link SimpleRMIServer} */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java index c7e73c41f..95e25c485 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java @@ -26,7 +26,7 @@ /** * A very simple RMI server. Provides a registry and the implementation of the {@link HelloWorld} * service. - * + * * @author Christian Kohlschütter */ public final class SimpleRMIServer { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java index 1c100b131..664a4ee7c 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java @@ -23,7 +23,7 @@ /** * The implementation of the very simple {@link World} service. - * + * * @author Christian Kohlschütter */ public class WorldImpl implements World { @@ -31,7 +31,7 @@ public class WorldImpl implements World { /** * Creates a new {@link World} instance. - * + * * @param text The text to return upon calling {@link #world()}. */ public WorldImpl(String text) { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java index 991def136..eab1c77e2 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java @@ -31,7 +31,7 @@ /** * Demonstrates how to read files via FileDescriptors that are exchanged via RMI. - * + * * @author Christian Kohlschütter * @see StreamServer */ @@ -42,7 +42,7 @@ private StreamClient() { /** * {@link StreamClient} command-line tool. - * + * * @param args Command-line arguments. * @throws IOException on error. * @throws NotBoundException if the server cannot be reached. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java index b432a7ca9..6df8d18f5 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java @@ -24,14 +24,14 @@ /** * Demonstrates how to read/write files via FileDescriptors that are exchanged via RMI. - * + * * This allows reading/writing from and to files that are otherwise not even accessible by the user. * For example, starting the {@link StreamServer} as root and the {@link StreamClient} as a * non-privileged user will allow the non-privileged user to read files only accessible to root. - * + * * NOTE: For obvious security reasons, running this server without modification is not advised for * anything other than demo purposes. - * + * * @author Christian Kohlschütter * @see StreamClient */ @@ -42,7 +42,7 @@ private StreamServer() { /** * {@link StreamServer} command-line tool. - * + * * @param args Command-line arguments. * @throws IOException on error. * @throws AlreadyBoundException if there was already a server running. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java index 6ac3eeb55..77e5bf6ed 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java @@ -35,7 +35,7 @@ /** * An implementation of {@link StreamService}. - * + * * @author Christian Kohlschütter */ public class StreamServiceImpl implements StreamService, Closeable { @@ -43,7 +43,7 @@ public class StreamServiceImpl implements StreamService, Closeable { /** * Creates a new instance. - * + * * @param socketFactory The socket factory to use. * @throws RemoteException on error. */ @@ -82,7 +82,7 @@ public RemoteCloseableImpl openForWriting(File path) throws IO /** * Checks if the given path may be accessed for reading. - * + * * @param path The path to check. * @return {@code true} if permitted. */ @@ -92,7 +92,7 @@ protected boolean mayRead(File path) { /** * Checks if the given path may be accessed for writing. - * + * * @param path The path to check. * @return {@code true} if permitted. */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java index bd004d294..b5989bd4a 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java @@ -22,13 +22,13 @@ /** * A very simple "hello world" service. - * + * * @author Christian Kohlschütter */ public interface HelloWorld extends Remote { /** * Returns "Hello". - * + * * @return "Hello" * @throws IOException if the operation fails. */ @@ -36,7 +36,7 @@ public interface HelloWorld extends Remote { /** * Returns "World" (or something else?). - * + * * @return "World" (usually) * @throws IOException if the operation fails. */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java index 5c56cf14b..1b3d37950 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java @@ -28,14 +28,14 @@ /** * The {@link StreamServer}'s RMI service. - * + * * @author Christian Kohlschütter * @see StreamServer */ public interface StreamService extends Remote { /** * Opens the given file for reading. - * + * * @param path The file to open. * @return A remote instance for the file. * @throws IOException on error. @@ -44,7 +44,7 @@ public interface StreamService extends Remote { /** * Opens the given file for writing. - * + * * @param path The file to open. * @return A remote instance for the file. * @throws IOException on error. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java index d8f341a0c..285bd5619 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java @@ -22,14 +22,14 @@ /** * A very simple "world" service. - * + * * @author Christian Kohlschütter * @see HelloWorld */ public interface World extends Remote { /** * Returns "World" (or something else?). - * + * * @return "World" (usually) * @throws RemoteException if the operation fails. */ diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java index 40338db84..e49e05bb3 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java @@ -28,7 +28,7 @@ /** * A multi-threaded unix socket server that implements a TCP-style character generator compliant * with RFC864. - * + * * @author Christian Kohlschütter */ public final class ChargenServer extends DemoServerBase { @@ -38,7 +38,7 @@ public final class ChargenServer extends DemoServerBase { /** * Defines a TCP-style character generator compliant with RFC864. - * + * * @see RFC864 */ private interface Chargen { @@ -83,9 +83,9 @@ private synchronized Chargen getChargen(Socket socket) throws SocketException { /** * A simple chargen implementation. - * + * * Even though this looks straightforward, it's not the fastest implementation. - * + * * @see FastChargen */ private static final class SimpleChargen implements Chargen { @@ -113,7 +113,7 @@ public void write(Socket socket) throws IOException { /** * A fast chargen implementation, using a pre-built data buffer that is just large enough to * always send a full array of bytes matching the socket's send buffer capacity. - * + * * @see SimpleChargen */ private static final class FastChargen implements Chargen { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java index c52f3d14c..ba857f15a 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java @@ -30,7 +30,7 @@ /** * An {@link SocketServer} that's just good for demo purposes. - * + * * @author Christian Kohlschütter */ abstract class DemoServerBase extends SocketServer { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java index aac916a28..6429501fb 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java @@ -25,7 +25,7 @@ /** * A multi-threaded unix socket server that simply echoes all input, byte per byte. - * + * * @author Christian Kohlschütter */ public final class EchoServer extends DemoServerBase { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java index ac600b8a8..5ec4bc325 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java @@ -25,7 +25,7 @@ /** * A multi-threaded unix socket server that simply reads all input, byte per byte, not doing * anything else with it. - * + * * @author Christian Kohlschütter */ public final class NullServer extends DemoServerBase { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java index 281b52578..e7b3fdf29 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java @@ -30,7 +30,7 @@ /** * A multi-threaded unix socket server that simply reads all input, byte per byte, not doing * anything else with it. - * + * * @author Christian Kohlschütter */ public final class SendFileHandleServer extends DemoServerBase { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java index a23c742e6..0fba2b422 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java @@ -26,7 +26,7 @@ /** * A demo program to configure and run several {@link SocketServer} demos from the command line. - * + * * @author Christian Kohlschütter */ public final class SocketServerDemo { diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java index 752f4c55f..7a8a26879 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java @@ -25,7 +25,7 @@ /** * A multi-threaded unix socket server that simply writes null-bytes, and does not attempt to read * anything. - * + * * @author Christian Kohlschütter */ // CPD-OFF diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java index 5dee06881..34d3a81fa 100644 --- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java +++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java @@ -32,11 +32,11 @@ /** * A {@link Connector} implementation for junixsocket server socket channels (Unix domains etc.) - * + * * Based upon jetty's ClientConnector. - * + * * This implementation should work with jetty version 10.0.8 or newer. - * + * * @author Christian Kohlschütter */ public final class AFSocketClientConnector extends ClientConnector { @@ -50,7 +50,7 @@ private AFSocketClientConnector(AFSocketAddress addr) { /** * Returns a new {@link ClientConnector} configured to use given {@link AFSocketAddress} for * communication with junixsocket sockets. - * + * * @param addr The socket address. * @return The client connector. */ diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java index 7991b8186..7227cf3c5 100644 --- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java +++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java @@ -81,9 +81,9 @@ /** * A {@link Connector} implementation for junixsocket server socket channels (Unix domains etc.) - * + * * Based upon jetty's UnixDomainServerConnector. - * + * * This implementation should work with jetty version 9.4.12 or newer. */ @ManagedObject @@ -105,7 +105,7 @@ public class AFSocketServerConnector extends AbstractConnector { /** * Creates a new {@link AFSocketServerConnector}. - * + * * @param server The server this connector will be added to. Must not be null. * @param factories The Connection Factories to use. */ @@ -115,7 +115,7 @@ public AFSocketServerConnector(Server server, ConnectionFactory... factories) { /** * Creates a new {@link AFSocketServerConnector}. - * + * * @param server The server this connector will be added to. Must not be null. * @param acceptors the number of acceptor threads to use, or -1 for a default value. If 0, then * no acceptor threads will be launched and some other mechanism will need to be used to @@ -130,7 +130,7 @@ public AFSocketServerConnector(Server server, int acceptors, int selectors, /** * Creates a new {@link AFSocketServerConnector}. - * + * * @param server The server this connector will be added to. Must not be null. * @param executor An executor for this connector or null to use the servers executor * @param scheduler A scheduler for this connector or null to either a {@link Scheduler} set as a @@ -172,9 +172,9 @@ private SelectorManager newSelectorManager(Executor executor, Scheduler schedule /** * Returns the Unix-Domain path this connector listens to. - * + * * Added for compatibility with jetty's {@code UnixDomainServerConnector}. - * + * * @return The Unix-Domain path this connector listens to. * @deprecated Use {@link #getListenSocketAddress()} instead. * @see #getListenSocketAddress() @@ -196,9 +196,9 @@ public Path getUnixDomainPath() { /** * Sets the Unix-Domain path this connector listens to. - * + * * Added for compatibility with jetty's {@code UnixDomainServerConnector}. - * + * * @param unixDomainPath The path. * @deprecated Use {@link #setListenSocketAddress(AFSocketAddress)} instead. * @see #setListenSocketAddress(AFSocketAddress) @@ -213,7 +213,7 @@ public void setUnixDomainPath(Path unixDomainPath) { /** * Returns the socket address this connector listens to. - * + * * @return The socket address, or {@code null} if none set. */ @ManagedAttribute("The socket address this connector listens to") @@ -224,7 +224,7 @@ public AFSocketAddress getListenSocketAddress() { /** * Sets the socket address this connector listens to. - * + * * @param addr The socket address, or {@code null}. */ @SuppressFBWarnings("EI_EXPOSE_REP2") @@ -234,7 +234,7 @@ public void setListenSocketAddress(AFSocketAddress addr) { /** * Checks whether this connector uses a server channel inherited from the JVM. - * + * * @return {@code true} if so. */ @ManagedAttribute("Whether this connector uses a server channel inherited from the JVM") @@ -244,7 +244,7 @@ public boolean isInheritChannel() { /** * Sets whether this connector uses a server channel inherited from the JVM. - * + * * @param inheritChannel {@code true} if so. */ public void setInheritChannel(boolean inheritChannel) { @@ -253,7 +253,7 @@ public void setInheritChannel(boolean inheritChannel) { /** * Returns the accept queue size (backlog) for the server socket. - * + * * @return The backlog. */ @ManagedAttribute("The accept queue size (backlog) for the server socket") @@ -263,7 +263,7 @@ public int getAcceptQueueSize() { /** * Sets the accept queue size (backlog) for the server socket. - * + * * @param acceptQueueSize The backlog. */ public void setAcceptQueueSize(int acceptQueueSize) { @@ -272,7 +272,7 @@ public void setAcceptQueueSize(int acceptQueueSize) { /** * Returns the SO_RCVBUF size for accepted sockets. - * + * * @return The buffer size. */ @ManagedAttribute("The SO_RCVBUF option for accepted sockets") @@ -282,7 +282,7 @@ public int getAcceptedReceiveBufferSize() { /** * Sets the SO_RCVBUF size for accepted sockets. - * + * * @param acceptedReceiveBufferSize The buffer size. */ public void setAcceptedReceiveBufferSize(int acceptedReceiveBufferSize) { @@ -291,7 +291,7 @@ public void setAcceptedReceiveBufferSize(int acceptedReceiveBufferSize) { /** * Returns the SO_SNDBUF size for accepted sockets. - * + * * @return The buffer size. */ @ManagedAttribute("The SO_SNDBUF option for accepted sockets") @@ -301,7 +301,7 @@ public int getAcceptedSendBufferSize() { /** * Sets the SO_SNDBUF size for accepted sockets. - * + * * @param acceptedSendBufferSize The buffer size. */ public void setAcceptedSendBufferSize(int acceptedSendBufferSize) { @@ -390,7 +390,7 @@ private void accepted(SocketChannel channel) throws IOException { /** * Configures an incoming {@link SocketChannel}, setting socket options such as receive and send * buffer sizes. - * + * * @param channel The socket channel to configure. * @throws IOException on error. */ @@ -533,7 +533,7 @@ protected void endPointClosed(EndPoint endpoint) { /** * Checks if this connector may stop the server when it's no longer able to serve and no other * connectors are available. - * + * * @return {@code true} if so. */ @ManagedAttribute("Whether this connector may stop the server when it's no longer able to" @@ -545,7 +545,7 @@ public boolean isMayStopServer() { /** * Sets if this connector may stop the server when it's no longer able to serve and no other * connectors are available. - * + * * @param mayStopServer {@code true} if so. */ public void setMayStopServer(boolean mayStopServer) { diff --git a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java index 4693d062b..03b4c7160 100644 --- a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java +++ b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java @@ -31,13 +31,13 @@ /** * Connect to mysql databases (and compatibles) using UNIX domain sockets. - * + * * NOTE: This SocketFactory currently implements the "old" Connector/J SocketFactory. This may * change in the future. - * + * * For the time being, see AFUNIXDatabaseSocketFactoryCJ to forcibly use the new "CJ"-style * SocketFactory. - * + * * @see AFUNIXDatabaseSocketFactoryCJ */ @SuppressWarnings("deprecation") diff --git a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java index 76f58e8e8..e1f0ed9d0 100644 --- a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java +++ b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java @@ -21,7 +21,7 @@ /** * Marker class to find native libraries in the classpath. - * + * * @author Christian Kohlschütter */ public final class NarMetadata { diff --git a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/package-info.java b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/package-info.java index fab548bde..8571110e3 100644 --- a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/package-info.java +++ b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/package-info.java @@ -1,6 +1,6 @@ /** * Helper package to identify the Maven artifact with JNI libraries for common architectures. - * + * * The set of common architectures is configured through Maven profiles and should at least contain * versions for Intel 64-bit macOS and Linux. */ diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java index 9bb43c164..5ee6f7e7c 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java @@ -48,7 +48,7 @@ /** * The {@link AFSocket}-compatible equivalent of {@link Naming}. Use this class for accessing RMI * registries that are reachable by {@link AFSocket}s. - * + * * @author Christian Kohlschütter */ public abstract class AFNaming extends AFRegistryAccess { @@ -67,7 +67,7 @@ public abstract class AFNaming extends AFRegistryAccess { /** * Creates a new naming instance with the given ports. - * + * * @param registryPort The registry port. * @param servicePort The port for AFRMIService. * @throws IOException on error. @@ -80,7 +80,7 @@ protected AFNaming(final int registryPort, final int servicePort) throws IOExcep /** * Creates a new {@link AFRegistry} given a {@link Registry} implementation. - * + * * @param impl The implementation. * @return The new {@link AFRegistry} instance. * @throws RemoteException on error. @@ -89,7 +89,7 @@ protected AFNaming(final int registryPort, final int servicePort) throws IOExcep /** * Creates or returns the {@link AFRMISocketFactory} to be used with this instance. - * + * * @return The socket factory. * @throws IOException on error. */ @@ -121,7 +121,7 @@ static T getInstance(final int registryPort, /** * Returns the {@link AFRMISocketFactory} associated with this instance. - * + * * @return The {@link AFRMISocketFactory}. */ @SuppressFBWarnings("EI_EXPOSE_REP") @@ -131,7 +131,7 @@ public synchronized AFRMISocketFactory getSocketFactory() { /** * Returns the registry port. - * + * * @return The port. */ public final int getRegistryPort() { @@ -184,10 +184,10 @@ public AFRegistry getRegistry() throws RemoteException { /** * Returns a reference to the existing RMI registry. - * + * * If there's no registry running at this port after waiting for up to the given time, an * exception is thrown. - * + * * @param timeout The timeout value. * @param unit The timeout unit. * @return The registry. @@ -208,7 +208,7 @@ public AFRegistry getRegistry(long timeout, TimeUnit unit) throws RemoteExceptio /** * Tries to access the registry, waiting some time if necessary. - * + * * @param timeout The timeout. * @param unit The unit for the timeout. * @return The registry instance. @@ -221,7 +221,7 @@ public AFRegistry getRegistry(long timeout, TimeUnit unit) throws RemoteExceptio * * If there's no registry running at this port, and {@code create} is set to {@code true}, a new * one is created; when {@code create} is set to {@code false}, {@code null} is returned. - * + * * @param create {@code true} if a new register may be created if necessary. * @return The registry, or {@code null} * @throws RemoteException If there was a problem. @@ -262,7 +262,7 @@ private AFRegistry locateRegistry() throws RemoteException { /** * Shuts this RMI Registry down. - * + * * @throws RemoteException if the operation fails. */ public void shutdownRegistry() throws RemoteException { @@ -359,12 +359,12 @@ private void shutdownViaRMIService(AFRegistry reg, AFRMIService serv) throws Rem /** * Creates a new RMI {@link Registry}. - * + * * If there already was a registry created previously, it is shut down and replaced by the current * one. - * + * * Use {@link #getRegistry()} to try to reuse an existing registry. - * + * * @return The registry * @throws RemoteException if the operation fails. * @see #getRegistry() @@ -407,14 +407,14 @@ public AFRegistry createRegistry() throws RemoteException { /** * Called by {@link #createRegistry()} right before creating/setting the registry. - * + * * @throws ServerException on error. */ protected abstract void initRegistryPrerequisites() throws ServerException; /** * Checks if this {@link AFNaming} instance can be shut down remotely. - * + * * @return {@code true} if remote shutdown is allowed. */ public boolean isRemoteShutdownAllowed() { @@ -423,7 +423,7 @@ public boolean isRemoteShutdownAllowed() { /** * Controls whether this {@link AFNaming} instance can be shut down remotely. - * + * * @param remoteShutdownAllowed {@code true} if remote shutdown is allowed. */ public void setRemoteShutdownAllowed(boolean remoteShutdownAllowed) { @@ -433,7 +433,7 @@ public void setRemoteShutdownAllowed(boolean remoteShutdownAllowed) { /** * Exports and binds the given Remote object to the given name, using the given {@link AFNaming} * setup. - * + * * @param name The name to use to bind the object in the registry. * @param obj The object to export and bind. * @throws RemoteException if the operation fails. @@ -448,7 +448,7 @@ public void exportAndBind(String name, Remote obj) throws RemoteException, Alrea /** * Exports and re-binds the given Remote object to the given name, using the given * {@link AFNaming} setup. - * + * * @param name The name to use to bind the object in the registry. * @param obj The object to export and bind. * @throws RemoteException if the operation fails. @@ -478,9 +478,9 @@ public void unexportAndUnbind(String name, Remote obj) throws RemoteException { /** * Exports the given Remote object, using the given socket factory and a randomly assigned port. - * + * * NOTE: This helper function can also be used for regular RMI servers. - * + * * @param obj The object to export. * @param socketFactory The socket factory to use. * @return The remote stub. @@ -494,9 +494,9 @@ public static Remote exportObject(Remote obj, RMISocketFactory socketFactory) /** * Forcibly un-exports the given object, if it exists (otherwise returns without an error). This * should be called upon closing a {@link Closeable} {@link Remote} object. - * + * * NOTE: This helper function can also be used for regular RMI servers. - * + * * @param obj The object to un-export. */ public static void unexportObject(Remote obj) { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java index e412a1396..49820365b 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java @@ -21,17 +21,17 @@ /** * The key to accessing to {@link AFNaming} instances. - * + * * Implementors must guarantee that {@link #hashCode()} and {@link #equals(Object)} correctly * identify duplicate providers. - * + * * @param The actual {@link AFNaming} subclass. * @author Christian Kohlschütter */ public interface AFNamingProvider { /** * Creates a new {@link AFNaming} instance using the given registry port. - * + * * @param registryPort The registry port. * @return The {@link AFNaming} instance. * @throws IOException on error. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java index 92f010b97..f9193f10e 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java @@ -22,7 +22,7 @@ /** * A reference to a {@link AFNaming} instance. - * + * * @author Christian Kohlschütter */ final class AFNamingRef { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java index 10d7edd85..b70b0bdd0 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java @@ -25,16 +25,16 @@ /** * The {@link AFRMIService} assigns and keeps track of anonymous ports, among other things. - * + * * This feature is to be used by {@link AFRMISocketFactory} only. - * + * * @author Christian Kohlschütter */ public interface AFRMIService extends Remote { /** * Registers a new anonymous port and returns it. When the port is not required anymore, it must * be returned via {@link #returnPort(int)}. - * + * * @return The new port. * @throws IOException if the operation fails. */ @@ -43,7 +43,7 @@ public interface AFRMIService extends Remote { /** * Returns a previously registered port. No error is thrown if the given port has not been * assigned before. - * + * * @param port The port. * @throws IOException if the operation fails. */ @@ -51,7 +51,7 @@ public interface AFRMIService extends Remote { /** * Returns a stream of open ports. - * + * * @return A sequence of open ports. * @throws RemoteException if the operation fails. */ @@ -59,9 +59,9 @@ public interface AFRMIService extends Remote { /** * Indicates whether a remote-shutdown of the RMI registry is allowed. - * + * * NOTE: A call to {@link #shutdown()} may or may not succeed regardless. - * + * * @return Indication of whether a remote-shutdown of the RMI registry is allowed. * @throws RemoteException if the operation fails. */ @@ -69,7 +69,7 @@ public interface AFRMIService extends Remote { /** * Asks that this RMI registry gets shut down. - * + * * @throws RemoteException if the operation fails. */ void shutdown() throws RemoteException; @@ -77,7 +77,7 @@ public interface AFRMIService extends Remote { /** * Adds the given {@link Closeable} to the list of instances to be closed upon shutdown of the RMI * registry. - * + * * @param closeable The instance. * @throws RemoteException if the operation fails. */ @@ -86,9 +86,9 @@ public interface AFRMIService extends Remote { /** * Removes the given {@link Closeable} from the list of instances to be closed upon shutdown of * the RMI registry. - * + * * No error is returned if the given element was not registered before. - * + * * @param closeable The instance. * @throws RemoteException if the operation fails. */ diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java index 01d5083bb..727aa7450 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java @@ -38,7 +38,7 @@ /** * A very simple implementation of a {@link AFRMIService}. - * + * * @author Christian Kohlschütter */ final class AFRMIServiceImpl implements AFRMIService { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java index 820fdfa5d..ba49e7e5e 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java @@ -42,7 +42,7 @@ /** * An {@link RMISocketFactory} that supports {@link AFSocket}s. - * + * * @author Christian Kohlschütter */ public abstract class AFRMISocketFactory extends RMISocketFactory implements Externalizable, @@ -61,7 +61,7 @@ public abstract class AFRMISocketFactory extends RMISocketFactory implements Ext /** * Constructor required per definition. - * + * * @see RMISocketFactory */ public AFRMISocketFactory() { @@ -71,7 +71,7 @@ public AFRMISocketFactory() { /** * Creates a new socket factory. - * + * * @param naming The {@link AFNaming} instance to use. * @param defaultClientFactory The default {@link RMIClientSocketFactory}. * @param defaultServerFactory The default {@link RMIServerSocketFactory}. @@ -106,7 +106,7 @@ public void onRuntimeShutdown(Thread thread) { /** * Creates a new socket address for the given RMI port. - * + * * @param port The port. * @return The socket address. * @throws IOException on error. @@ -115,7 +115,7 @@ public void onRuntimeShutdown(Thread thread) { /** * Creates a new socket that is connected to the given socket address. - * + * * @param addr The socket address. * @return The connected socket. * @throws IOException on error. @@ -167,7 +167,7 @@ private AFRMIService getRmiService() throws IOException { /** * Returns a new free port. - * + * * @return The new port. * @throws IOException on error. * @see #returnPort(int) @@ -178,7 +178,7 @@ protected int newPort() throws IOException { /** * Returns a port that was previously returned by {@link #newPort()}. - * + * * @param port The port to return. * @throws IOException on error. */ @@ -298,7 +298,7 @@ public void writeExternal(ObjectOutput out) throws IOException { /** * Deserializes information necessary to instantiate the {@link AFNaming} instance. - * + * * @param in The stream. * @return The {@link AFNaming} instance. * @throws IOException on error. @@ -307,7 +307,7 @@ public void writeExternal(ObjectOutput out) throws IOException { /** * Serializes information necessary to instantiate the given {@link AFNaming} instance. - * + * * @param out The stream. * @param namingInstance The {@link AFNaming} instance. * @throws IOException on error. @@ -317,7 +317,7 @@ protected abstract void writeNamingInstance(ObjectOutput out, AFNaming namingIns /** * Checks if the given port refers to a local server port. - * + * * @param port The port to check. * @return {@code true} if the given port is a local server. */ @@ -332,7 +332,7 @@ public boolean isLocalServer(int port) { /** * The naming instance. - * + * * @return The instance. */ protected AFNaming getNaming() { @@ -341,7 +341,7 @@ protected AFNaming getNaming() { /** * Checks if this socket factory has some knowledge about the given port. - * + * * @param port The port. * @return {@code true} if registered. */ diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java index c2402bb0b..8ef24ff23 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java @@ -39,7 +39,7 @@ /** * A wrapper for RMI registries, both remote and local, to allow for a clean removal of bound * resources upon shutdown. - * + * * @author Christian Kohlschütter */ public abstract class AFRegistry implements Registry { @@ -78,7 +78,7 @@ public void onRuntimeShutdown(Thread thread) { /** * Returns {@code true} if the wrapped Registry instance is a locally created * {@link RemoteServer}. - * + * * @return {@code true} if wrapped instance is a locally created {@link RemoteServer}. * @see #isLocal() */ @@ -89,7 +89,7 @@ public boolean isRemoteServer() { /** * Returns {@code true} if the wrapped Registry instance is locally created. - * + * * @return {@code true} if wrapped instance is locally created. */ public final boolean isLocal() { @@ -98,7 +98,7 @@ public final boolean isLocal() { /** * Returns the {@link AFNaming} instance responsible for this registry. - * + * * @return The {@link AFNaming} instance. */ @SuppressFBWarnings("EI_EXPOSE_REP") diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java index 24d08c92f..050113ca8 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java @@ -28,9 +28,9 @@ abstract class AFRegistryAccess { /** * Returns a reference to the existing RMI registry. - * + * * If there's no registry running at this port, an exception is thrown. - * + * * @return The registry. * @throws RemoteException If there was a problem. */ @@ -38,7 +38,7 @@ abstract class AFRegistryAccess { /** * Convenience method for {@code getRegistry().lookup}. - * + * * @param name the name for the remote reference to look up * @return The instance * @throws NotBoundException upon error @@ -53,7 +53,7 @@ public Remote lookup(String name) throws NotBoundException, MalformedURLExceptio /** * Convenience method for {@code getRegistry().lookup}. - * + * * @param name the name for the remote reference to look up * @param timeout The timeout value. * @param unit The timeout unit. @@ -70,7 +70,7 @@ public Remote lookup(String name, long timeout, TimeUnit unit) throws NotBoundEx /** * Convenience method for {@code getRegistry().unbind}. - * + * * @param name the name for the remote reference to unbind * @throws RemoteException upon error * @throws NotBoundException upon error @@ -83,7 +83,7 @@ public void unbind(String name) throws RemoteException, NotBoundException, Malfo /** * Convenience method for {@code getRegistry().bind}. - * + * * @param name the name for the remote reference to bind * @param obj the remote reference to bind * @throws RemoteException upon error @@ -98,7 +98,7 @@ public void bind(String name, Remote obj) throws AlreadyBoundException, Malforme /** * Convenience method for {@code getRegistry().rebind}. - * + * * @param name the name for the remote reference to rebind * @param obj the remote reference to rebind * @throws RemoteException upon error @@ -111,10 +111,10 @@ public void rebind(String name, Remote obj) throws MalformedURLException, Remote /** * Convenience method for {@code getRegistry().list}. - * + * * Unlike {@link AFRegistry#list()}, in case the registry has been shut down already, an empty * array is returned. - * + * * @return an array of the names bound in this registry * @throws RemoteException upon error * @throws AccessException upon error diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java index 10566abef..928b8e4ab 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java @@ -35,7 +35,7 @@ /** * The {@link AFUNIXSocket}-compatible equivalent of {@link Naming}. Use this class for accessing * RMI registries that are reachable by {@link AFUNIXSocket}s. - * + * * @author Christian Kohlschütter */ public final class AFUNIXNaming extends AFNaming { @@ -66,10 +66,10 @@ private AFUNIXNaming(File socketDir, int registryPort, String socketPrefix, Stri /** * Returns the directory where RMI sockets are stored by default. - * + * * You can configure this location by setting the System property * {@code org.newsclub.net.unix.rmi.socketdir} upon start. - * + * * @return The directory. */ public static File getDefaultSocketDirectory() { @@ -79,7 +79,7 @@ public static File getDefaultSocketDirectory() { /** * Returns a new private instance that resides in a custom location, to avoid any collisions with * existing instances. - * + * * @return The private {@link AFNaming} instance. * @throws IOException if the operation fails. */ @@ -98,7 +98,7 @@ public static AFUNIXNaming newPrivateInstance() throws IOException { /** * Returns the default instance of {@link AFUNIXNaming}. Sockets are stored in * java.io.tmpdir. - * + * * @return The default instance. * @throws IOException if the operation fails. */ @@ -109,7 +109,7 @@ public static AFUNIXNaming getInstance() throws IOException { /** * Returns a {@link AFUNIXNaming} instance which support several socket files that can be stored * under the same, given directory. - * + * * @param socketDir The directory to store sockets in. * @return The instance. * @throws RemoteException if the operation fails. @@ -121,10 +121,10 @@ public static AFUNIXNaming getInstance(final File socketDir) throws RemoteExcept /** * Returns a {@link AFUNIXNaming} instance which support several socket files that can be stored * under the same, given directory. - * + * * A custom "registry port" can be specified. Typically, AF-UNIX specific ports should be above * {@code 100000}. - * + * * @param socketDir The directory to store sockets in. * @param registryPort The registry port. Should be above {@code 100000}. * @return The instance. @@ -138,10 +138,10 @@ public static AFUNIXNaming getInstance(File socketDir, final int registryPort) /** * Returns a {@link AFUNIXNaming} instance which support several socket files that can be stored * under the same, given directory. - * + * * A custom "registry port" can be specified. Typically, AF-UNIX specific ports should be above * {@code 100000}. - * + * * @param socketDir The directory to store sockets in. * @param registryPort The registry port. Should be above {@code 100000}. * @param socketPrefix A string to be inserted at the beginning of each socket filename, or @@ -183,7 +183,7 @@ public AFUNIXNaming newInstance(int port) throws IOException { /** * Returns an {@link AFUNIXNaming} instance which only supports one file. (Probably only useful * when you want/can access the exported {@link UnicastRemoteObject} directly) - * + * * @param socketFile The socket file. * @return The instance. * @throws IOException if the operation fails. @@ -221,7 +221,7 @@ public AFUNIXRegistry createRegistry() throws RemoteException { * Returns the socket file which is used to control the RMI registry. * * The file is usually in the directory returned by {@link #getRegistrySocketDir()}. - * + * * @return The directory. */ public File getRegistrySocketFile() { @@ -285,7 +285,7 @@ protected void shutdownRegistryFinishingTouches() { /** * Returns the directory in which sockets used by this registry are located. - * + * * @return The directory. */ public File getRegistrySocketDir() { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java index 4f101db97..c04fb153e 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java @@ -39,7 +39,7 @@ /** * An {@link RMISocketFactory} that supports {@link AFUNIXSocket}s. - * + * * @author Christian Kohlschütter */ public class AFUNIXRMISocketFactory extends AFRMISocketFactory { @@ -56,7 +56,7 @@ public class AFUNIXRMISocketFactory extends AFRMISocketFactory { /** * Constructor required per definition. - * + * * @see RMISocketFactory */ public AFUNIXRMISocketFactory() { @@ -65,7 +65,7 @@ public AFUNIXRMISocketFactory() { /** * Creates a new socket factory. - * + * * @param naming The {@link AFNaming} instance to use. * @param socketDir The directory to store the sockets in. * @param defaultClientFactory The default {@link RMIClientSocketFactory}. @@ -90,7 +90,7 @@ public AFUNIXRMISocketFactory(final AFNaming naming, final File socketDir, /** * Creates a new socket factory. - * + * * @param naming The {@link AFNaming} instance to use. * @param socketDir The directory to store the sockets in. * @param defaultClientFactory The default {@link RMIClientSocketFactory}. @@ -105,7 +105,7 @@ public AFUNIXRMISocketFactory(AFNaming naming, File socketDir, /** * Creates a new socket factory. - * + * * @param naming The {@link AFNaming} instance to use. * @param socketDir The directory to store the sockets in. * @throws IOException on error. @@ -164,7 +164,7 @@ public boolean equals(Object other) { /** * The directory in which socket files are stored. - * + * * @return The directory. */ public File getSocketDir() { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java index 7f94a6042..f03defa1f 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java @@ -23,9 +23,9 @@ /** * A wrapper for RMI registries, both remote and local, to allow for a clean removal of bound * resources upon shutdown. - * + * * This subclass mostly exists for backwards compatibility. - * + * * @author Christian Kohlschütter */ public class AFUNIXRegistry extends AFRegistry { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java index a7b3cb4ca..c85243fe3 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java @@ -26,7 +26,7 @@ /** * An implementation of {@link RMIClientSocketFactory}. - * + * * @see AFRMISocketFactory where we deal with {@link AFSocket}s. */ public final class DefaultRMIClientSocketFactory implements RMIClientSocketFactory, Serializable { @@ -38,7 +38,7 @@ private DefaultRMIClientSocketFactory() { /** * Returns the singleton instance for DefaultRMIClientSocketFactory. - * + * * @return The singleton. */ public static DefaultRMIClientSocketFactory getInstance() { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java index 55c688763..dadcd675e 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java @@ -26,7 +26,7 @@ /** * An implementation of {@link RMIServerSocketFactory}. - * + * * @see AFRMISocketFactory where we deal with {@link AFSocket}. */ public class DefaultRMIServerSocketFactory implements RMIServerSocketFactory, Serializable { @@ -42,7 +42,7 @@ public DefaultRMIServerSocketFactory() { /** * Returns the singleton instance for DefaultRMIServerSocketFactory. - * + * * @return The singleton. */ public static DefaultRMIServerSocketFactory getInstance() { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java index 246e302c9..e1dc0aec6 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java @@ -23,7 +23,7 @@ /** * Contains some default ports used by junixsocket for RMI-over-AF_UNIX etc. - * + * * @author Christian Kohlschütter * @see AFRMISocketFactory * @see AFRMIService @@ -42,14 +42,14 @@ final class RMIPorts { /** * This is the port reserved for the port assigner. - * + * * @see AFRMIService */ static final int RMI_SERVICE_PORT = 100002; /** * This is the base for anonymous ports. Any anonymous port will be higher than this number. - * + * * @see AFRMIService */ static final int ANONYMOUS_PORT_BASE = 110000; diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java index 54aa9fc48..2c09add67 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java @@ -24,17 +24,17 @@ /** * A resource that can be exposed remotely, and closed locally as well as remotely. - * + * * @author Christian Kohlschütter */ public interface RemoteCloseable extends Remote, Closeable { /** * Returns the resource (or the Remote instance of it). - * + * * If the returned resource is {@link Closeable}, then closing via {@code get().close()}} will * affect the client-side (local), but not necessarily the server-side as well (the exact behavior * depends on the resource). - * + * * @return The wrapped resource. * @throws NoSuchObjectException if this instance has been closed already. * @throws IOException if there was a problem. @@ -44,7 +44,7 @@ public interface RemoteCloseable extends Remote, Closeable { /** * Closes the resource on the server-side (i.e., where it was created), and — as long as the * wrapped resource returned by {@link #get()} supports it — locally as well. - * + * * @throws IOException if there was a problem. */ @Override diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java index 2eb581474..3175121de 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java @@ -33,7 +33,7 @@ public class RemoteCloseableImpl implements RemoteCloseable { /** * Created a new instance. - * + * * @param socketFactory The socket factory. * @param obj The object to wrap. * @throws RemoteException on error. @@ -51,7 +51,7 @@ public final void close() throws IOException { /** * Closes the given object. - * + * * @param obj The object to close. * @throws IOException on error. */ diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java index 42406fe4f..7cc2e1e30 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java @@ -24,7 +24,7 @@ /** * A generic (unspecific) {@link FileDescriptor} reference. - * + * * @author Christian Kohlschütter * @see RemoteFileInput * @see RemoteFileOutput @@ -34,7 +34,7 @@ public final class RemoteFileDescriptor extends RemoteFileDescriptorBase { /** * Creates an uninitialized instance; used for externalization. - * + * * @see #readExternal(ObjectInput) */ public RemoteFileDescriptor() { @@ -44,7 +44,7 @@ public RemoteFileDescriptor() { /** * Creates a new {@link RemoteFileOutput} instance, encapsulating a generic {@link FileDescriptor} * so that it can be shared with other processes via RMI. - * + * * @param socketFactory The socket factory. * @param fd The {@link FileDescriptor}. */ diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java index 32a4a1224..642d7b052 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java @@ -46,7 +46,7 @@ /** * A wrapper that allows a {@link FileDescriptor} be sent via RMI over AF_UNIX sockets. - * + * * @author Christian Kohlschütter * @see RemoteFileInput subclass for sending {@link FileInputStream}s. * @see RemoteFileOutput subclass for sending {@link FileOutputStream}s. @@ -75,7 +75,7 @@ public abstract class RemoteFileDescriptorBase implements Externalizable, Clo /** * An optional, closeable resource that is related to this instance. If the reference is non-null, * this will be closed upon {@link #close()}. - * + * * For unidirectional implementations, this could be the corresponding input/output stream. For * bidirectional implementations (e.g., a Socket, Pipe, etc.), this should close both directions. */ @@ -87,7 +87,7 @@ public abstract class RemoteFileDescriptorBase implements Externalizable, Clo /** * Creates an uninitialized instance; used for externalization. - * + * * @see #readExternal(ObjectInput) */ RemoteFileDescriptorBase() { @@ -223,10 +223,10 @@ public final void readExternal(ObjectInput objIn) throws IOException, ClassNotFo /** * Returns the file descriptor. - * + * * This is either the original one that was specified in the constructor or a copy that was sent * via RMI over an AF_UNIX connection as part of an ancillary message. - * + * * @return The file descriptor. */ @Override @@ -237,11 +237,11 @@ public final FileDescriptor getFileDescriptor() { /** * Returns the "magic value" for this type of file descriptor. - * + * * The magic value consists of an indicator ("this is a file descriptor") as well as its * capabilities (read/write). It is used to prevent, for example, converting an output stream to * an input stream. - * + * * @return The magic value. */ protected final int getMagicValue() { diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java index bad662be2..1042687b3 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java @@ -25,7 +25,7 @@ /** * A specialized subclass of {@link RemoteFileDescriptorBase}, specifically for * {@link FileInputStream}s. - * + * * @author Christian Kohlschütter */ public final class RemoteFileInput extends RemoteFileDescriptorBase implements @@ -34,7 +34,7 @@ public final class RemoteFileInput extends RemoteFileDescriptorBase { @@ -33,7 +33,7 @@ public final class RemoteFileOutput extends RemoteFileDescriptorBase * if (thread != Thread.currentThread() || !(thread instanceof ShutdownThread)) { * throw new IllegalStateException("Illegal caller"); } * - * + * * @param thread The current Thread. * @throws Exception Most likely ignored */ @@ -90,7 +90,7 @@ interface ShutdownHook { /** * The Thread that will be called upon Runtime shutdown. - * + * * @author Christian Kohlschütter */ static final class ShutdownThread extends Thread { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java index f8dca96f1..2af28e5fc 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java @@ -22,13 +22,13 @@ /** * A very simple "hello" service. - * + * * @author Christian Kohlschütter */ public interface Hello extends Remote { /** * Returns "Hello". - * + * * @return "Hello" * @throws IOException if the operation fails. */ diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java index 813f61658..9d4b4e5f4 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java @@ -21,7 +21,7 @@ /** * The implementation of the very simple {@link Hello} service. - * + * * @author Christian Kohlschütter */ public class HelloImpl implements Hello { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java index b8c4092ab..152324723 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java @@ -25,10 +25,10 @@ /** * Tests whether we can get the junixsocket version (which is encoded in a properties file). - * + * * This can't easily be tested from within the Maven build for junixsocket-common, which is why we * have it in junixsocket-rmi. - * + * * @author Christian Kohlschütter */ public class JunixsocketVersionTest { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java index 57575f843..67bde461a 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java @@ -25,10 +25,10 @@ /** * Exposes a {@link FileInputStream}'s basic functionality over RMI. - * + * * As opposed to {@link RemoteFileDescriptorBase}, all data is read, then copied and serialized via * RMI. - * + * * @author Christian Kohlschütter * @see RemoteFileDescriptorBase for a better way. */ diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java index 5446de81f..747dbb320 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java @@ -30,7 +30,7 @@ /** * Verifies that peer credentials are properly set when communicating over RMI. - * + * * @author Christian Kohlschütter */ @AFSocketCapabilityRequirement({ diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java index 961aa72e7..0d520b667 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java @@ -35,7 +35,7 @@ /** * Tests {@link RemoteCloseable}. - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings({ diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java index 47b7e7894..a5322e0ea 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java @@ -22,7 +22,7 @@ /** * To be used by {@link RemoteCloseableTest}. - * + * * @author Christian Kohlschütter */ public interface RemoteCloseableThing extends Serializable { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java index a904ca45b..68b6b1097 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java @@ -23,7 +23,7 @@ /** * To be used by {@link RemoteCloseableTest}. - * + * * @author Christian Kohlschütter */ abstract class RemoteCloseableThingImpl implements RemoteCloseableThing { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java index 263ce5b39..46225cc2a 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java @@ -25,7 +25,7 @@ /** * Provides references to all "junixsocket-rmi" tests that should be included in * junixsocket-selftest. - * + * * @author Christian Kohlschütter */ public class SelftestProvider { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java index ca636f569..498ebcf12 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java @@ -28,9 +28,9 @@ /** * A simple RMI Registry that is launched as forked Java VM from unit tests such as * {@link RemoteRegistryTest}. - * + * * Important: The server will terminate ca. 10 seconds after starting. - * + * * @author Christian Kohlschütter */ public class TestRegistryServer { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java index 05fd71389..7646219ac 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java @@ -24,7 +24,7 @@ /** * A test service. - * + * * @author Christian Kohlschütter */ public interface TestService extends Remote { diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java index c1d9d2092..c17c994b2 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java @@ -37,7 +37,7 @@ /** * The implementation for the test service. - * + * * @author Christian Kohlschütter */ public class TestServiceImpl implements TestService, Closeable { diff --git a/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java b/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java index c9c846e46..c7a83ef49 100644 --- a/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java +++ b/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java @@ -21,7 +21,7 @@ /** * Main entry. - * + * * @author Christian Kohlschütter */ public final class Main { // NOPMD @@ -31,7 +31,7 @@ private Main() { /** * Starts junixsocket-selftest. - * + * * @param args The args. * @throws Exception on error. */ diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java index 51eb15d9f..4460db375 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java @@ -63,12 +63,12 @@ /** * Performs a series of self-tests. - * + * * Specifically, we run all unit tests of junixsocket-core and junixsocket-rmi. - * + * * NOTE: The Selftest will fail when run from within Eclipse due to test classes not being present. * Invoke via java -jar junixsocket-selftest-...-jar-with-dependencies.jar. - * + * * @author Christian Kohlschütter */ @SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.CognitiveComplexity"}) @@ -124,7 +124,7 @@ public static final SkipMode parse(String skipMode) { /** * maven-shade-plugin's minimizeJar isn't perfect, so we give it a little hint by adding static * references to classes that are otherwise only found via reflection. - * + * * @author Christian Kohlschütter */ @SuppressFBWarnings("UUF_UNUSED_FIELD") @@ -162,9 +162,9 @@ public void checkVM() { /** * Run this from the command line to ensure junixsocket works correctly on the target system. - * + * * A zero error code indicates success. - * + * * @param args Ignored. * @throws IOException on error. */ @@ -324,7 +324,7 @@ public void checkCapabilities() { /** * Checks if any test has failed so far. - * + * * @return {@code true} if failed. */ public boolean isFail() { @@ -368,7 +368,7 @@ private void checkInitError() { /** * Dumps the results of the selftest. - * + * */ public void dumpResults() { // NOPMD if (modified) { @@ -462,7 +462,7 @@ private SkipMode getSkipModeForClass(String className) { /** * Runs the given test classes for the specified module. - * + * * @param module The module name. * @param testClasses The test classes. */ diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java index dff5bb7c7..e4f385008 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java @@ -24,11 +24,11 @@ /** * Provides references to all tests that should be included in junixsocket-selftest. - * + * * Important: This is just a dummy implementation so we can properly develop in Eclipse. The actual * provider is in src/main/java-overlay/... and contains references to test classes from * junixsocket-common and junixsocket-rmi, which are otherwise not accessible from this artifact. - * + * * @author Christian Kohlschütter */ public class SelftestProvider { diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java index 2fa7b2964..5d704d981 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java @@ -27,14 +27,14 @@ /** * A base implementation for a simple, multi-threaded socket server using {@link AFSocket}s. - * + * * @author Christian Kohlschütter */ public abstract class AFSocketServer extends SocketServer, AFServerSocket> { /** * Creates a server using the given, bound {@link ServerSocket}. - * + * * @param serverSocket The server socket to use (must be bound). */ public AFSocketServer(AFServerSocket serverSocket) { @@ -43,7 +43,7 @@ public AFSocketServer(AFServerSocket serverSocket) { /** * Creates a server using the given {@link SocketAddress}. - * + * * @param listenAddress The address to bind the socket on. */ public AFSocketServer(A listenAddress) { diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java index 5941e9d62..edaca98fd 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java @@ -27,16 +27,16 @@ /** * A base implementation for a simple, multi-threaded socket server. - * + * * This class supports both AF_UNIX and "regular" sockets. - * + * * @author Christian Kohlschütter * @deprecated Use {@link SocketServer} or {@link AFSocketServer} */ public abstract class AFUNIXSocketServer extends SocketServer { /** * Creates a server using the given, bound {@link ServerSocket}. - * + * * @param serverSocket The server socket to use (must be bound). */ public AFUNIXSocketServer(ServerSocket serverSocket) { @@ -45,7 +45,7 @@ public AFUNIXSocketServer(ServerSocket serverSocket) { /** * Creates a server using the given {@link SocketAddress}. - * + * * @param listenAddress The address to bind the socket on. */ public AFUNIXSocketServer(SocketAddress listenAddress) { @@ -54,7 +54,7 @@ public AFUNIXSocketServer(SocketAddress listenAddress) { /** * Starts the server and waits until it is ready or had to shop due to an error. - * + * * @param duration The duration wait. * @param unit The duration's time unit. * @return {@code true} if the server is ready to serve requests. diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java index 7cea54141..a1977d25f 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java @@ -43,7 +43,7 @@ /** * A base implementation for a simple, multi-threaded socket server. - * + * * @author Christian Kohlschütter * @see AFSocketServer */ @@ -70,7 +70,7 @@ public abstract class SocketServer implements diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java index e652792cf..728faf03a 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java @@ -28,7 +28,7 @@ /** * A {@link DatagramSocket} implementation that works with {@code AF_TIPC} sockets. - * + * * @author Christian Kohlschütter */ public final class AFTIPCDatagramSocket extends AFDatagramSocket implements @@ -54,7 +54,7 @@ protected AFTIPCDatagramChannel newChannel() { /** * Returns a new {@link AFTIPCDatagramSocket} instance, using the default * {@link AFSocketType#SOCK_DGRAM} socket type. - * + * * @return The new instance. * @throws IOException on error. */ @@ -64,7 +64,7 @@ public static AFTIPCDatagramSocket newInstance() throws IOException { /** * Returns a new {@link AFTIPCDatagramSocket} instance for the given socket type. - * + * * @param socketType The socket type. * @return The new instance. * @throws IOException on error. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java index 1431f4280..50e21ce19 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java @@ -25,7 +25,7 @@ /** * The TIPC-specific DestName response that may be included as ancillary data. - * + * * @author Christian Kohlschütter */ public final class AFTIPCDestName implements Serializable { @@ -47,7 +47,7 @@ public final class AFTIPCDestName implements Serializable { /** * Creates a new instance. - * + * * @param type The "type" value. * @param lower The "lower" service range value (or the service "instance" if {@code lower} and * {@code upper} are the same). @@ -62,7 +62,7 @@ public AFTIPCDestName(int type, int lower, int upper) { /** * Returns the "type" value. - * + * * @return The type. */ public int getType() { @@ -72,7 +72,7 @@ public int getType() { /** * Returns the "lower" value of the service range (or the service "instance" if identical to the * upper value). - * + * * @return The lower value. */ public int getLower() { @@ -82,7 +82,7 @@ public int getLower() { /** * Returns the "upper" value of the service range (or the service "instance" if identical to the * lower value). - * + * * @return The upper value. */ public int getUpper() { @@ -91,7 +91,7 @@ public int getUpper() { /** * Checks if this DestName describes a service range (as opposed to a service) address. - * + * * @return {@code true} if the {@link #getLower()} value is different from the {@link #getUpper()} * value. */ @@ -102,7 +102,7 @@ public boolean isServiceRange() { /** * Converts this DestName to a proper {@link AFTIPCSocketAddress}, by using the given * {@link Scope} (which is otherwise not included). - * + * * @param scope The scope to use. * @param alwaysRange If {@code true}, a service range address is even returned when a service * address would suffice. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java index 54885264e..3a83fe98d 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java @@ -26,7 +26,7 @@ /** * The TIPC-specific error info response that may be included as ancillary data. - * + * * @author Christian Kohlschütter */ public final class AFTIPCErrInfo implements Serializable { @@ -44,7 +44,7 @@ public final class AFTIPCErrInfo implements Serializable { /** * Some TIPC error code. - * + * * @author Christian Kohlschütter */ @NonNullByDefault @@ -100,7 +100,7 @@ private ErrorCode(String name, int id) { /** * Returns an {@link ErrorCode} instance given an integer. - * + * * @param v The value. * @return The instance. */ @@ -111,7 +111,7 @@ public static ErrorCode ofValue(int v) { /** * Creates a new instance. - * + * * @param errorCode The error code. * @param dataLength The length of the returned data. */ @@ -122,7 +122,7 @@ public AFTIPCErrInfo(ErrorCode errorCode, int dataLength) { /** * Returns the error code. - * + * * @return The error code. */ public ErrorCode getErrorCode() { @@ -131,7 +131,7 @@ public ErrorCode getErrorCode() { /** * The length of the corresponding data. - * + * * @return The length in bytes. */ public int getDataLength() { diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java index c3048d201..dbc4f1eac 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java @@ -25,7 +25,7 @@ /** * A TIPC group request. - * + * * @author Christian Kohlschütter */ @NonNullByDefault @@ -43,7 +43,7 @@ public final class AFTIPCGroupRequest { /** * Some flags used in the group request. - * + * * @author Christian Kohlschütter */ public static final class GroupRequestFlags extends NamedIntegerBitmask { @@ -75,7 +75,7 @@ private GroupRequestFlags(@Nullable String name, int flags) { /** * Returns a {@link GroupRequestFlags} instance given an integer value. - * + * * @param v The value. * @return The instance. */ @@ -86,7 +86,7 @@ public static GroupRequestFlags ofValue(int v) { /** * Returns a {@link GroupRequestFlags} instance representing the combination of the given list * of {@link GroupRequestFlags} flags. - * + * * @param flags The flags (zero or more values). * @return The instance. */ @@ -96,7 +96,7 @@ public static GroupRequestFlags withFlags(@NonNull GroupRequestFlags... flags) { /** * Combines the given {@link GroupRequestFlags} instance with another one. - * + * * @param other The other instance. * @return The combined instance. */ @@ -115,7 +115,7 @@ private AFTIPCGroupRequest(int type, int instance, Scope scope, GroupRequestFlag /** * Returns an {@link AFTIPCGroupRequest} instance using the given parameters. - * + * * @param type The group type. * @param instance The group instance. * @param scope The group scope. @@ -134,7 +134,7 @@ public static AFTIPCGroupRequest with(int type, int instance, Scope scope, /** * Returns an {@link AFTIPCGroupRequest} instance using the given parameters, implying cluster * scope. - * + * * @param type The group type. * @param instance The group instance. * @param flags The request flags. @@ -150,7 +150,7 @@ static AFTIPCGroupRequest fromNative(int type, int instance, int scopeId, int fl /** * Returns the group type. - * + * * @return The group type. */ public int getType() { @@ -159,7 +159,7 @@ public int getType() { /** * Returns the group instance. - * + * * @return The group instance. */ public int getInstance() { @@ -168,7 +168,7 @@ public int getInstance() { /** * Returns the group scope. - * + * * @return The group scope. */ public Scope getScope() { @@ -185,7 +185,7 @@ int getFlagsValue() { /** * Returns the group request flags. - * + * * @return The group request flags. */ public GroupRequestFlags getFlags() { diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java index 722154673..6251e3248 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java @@ -21,7 +21,7 @@ /** * Describes the protocol families supported by junixsocket-tipc. - * + * * @author Christian Kohlschütter */ public enum AFTIPCProtocolFamily implements ProtocolFamily { diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java index e040071c4..e8d92b6b6 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java @@ -99,7 +99,7 @@ private AFTIPCSelectorProvider() { /** * Returns the singleton instance. - * + * * @return The instance. */ @SuppressFBWarnings("MS_EXPOSE_REP") @@ -109,7 +109,7 @@ public static AFTIPCSelectorProvider getInstance() { /** * Returns the singleton instance. - * + * * @return The instance. */ public static AFTIPCSelectorProvider provider() { @@ -118,7 +118,7 @@ public static AFTIPCSelectorProvider provider() { /** * Constructs a new socket pair from two sockets. - * + * * @param s1 Some socket, the first one. * @param s2 Some socket, the second one. * @return The pair. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java index 98aaf1ec2..d95ebe193 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java @@ -30,7 +30,7 @@ /** * The server part of an {@code AF_TIPC} socket. - * + * * @author Christian Kohlschütter */ public class AFTIPCServerSocket extends AFServerSocket { @@ -50,7 +50,7 @@ public AFTIPCServerSocketChannel getChannel() { /** * Returns a new, unbound AF_TIPC {@link ServerSocket}. - * + * * @return The new, unbound {@link AFServerSocket}. * @throws IOException if the operation fails. */ @@ -67,7 +67,7 @@ static AFTIPCServerSocket newInstance(FileDescriptor fdObj, int localPort, int r /** * Returns a new AF_TIPC {@link ServerSocket} that is bound to the given * {@link AFTIPCSocketAddress}. - * + * * @param addr The socket file to bind to. * @return The new, bound {@link AFServerSocket}. * @throws IOException if the operation fails. @@ -78,7 +78,7 @@ public static AFTIPCServerSocket bindOn(final AFTIPCSocketAddress addr) throws I /** * Returns a new AF_TIPC {@link ServerSocket} that is bound to the given {@link AFSocketAddress}. - * + * * @param addr The socket file to bind to. * @param deleteOnClose If {@code true}, the socket file (if the address points to a file) will be * deleted upon {@link #close}. @@ -93,7 +93,7 @@ public static AFTIPCServerSocket bindOn(final AFTIPCSocketAddress addr, boolean /** * Returns a new, unbound AF_TIPC {@link ServerSocket} that will always bind to the given * address, regardless of any socket address used in a call to bind. - * + * * @param forceAddr The address to use. * @return The new, yet unbound {@link AFServerSocket}. * @throws IOException if an exception occurs. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java index ddceca75e..42527b4ad 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java @@ -24,7 +24,7 @@ /** * A selectable channel for stream-oriented listening sockets. - * + * * @author Christian Kohlschütter */ public final class AFTIPCServerSocketChannel extends AFServerSocketChannel { diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java index caea0b233..8c1bcbd12 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java @@ -31,7 +31,7 @@ /** * Implementation of an {@code AF_TIPC} socket. - * + * * @author Christian Kohlschütter */ public final class AFTIPCSocket extends AFSocket implements @@ -56,13 +56,13 @@ private static synchronized AFTIPCSocketImplExtensions getStaticImplExtensions() /** * Returns true iff {@link AFTIPCSocket}s (sockets of type "AF_TIPC") are supported * by the current Java VM and the kernel. - * + * * To support {@link AFTIPCSocket}s, a custom JNI library must be loaded that is supplied with * junixsocket, and the system must support AF_TIPC sockets. - * + * * This call is equivalent to checking {@link AFSocket#isSupported()} and * {@link AFSocket#supports(AFSocketCapability)} with {@link AFSocketCapability#CAPABILITY_TIPC}. - * + * * @return {@code true} iff supported. */ public static boolean isSupported() { @@ -76,12 +76,12 @@ protected AFTIPCSocketChannel newChannel() { /** * Creates a new, unbound {@link AFSocket}. - * + * * This "default" implementation is a bit "lenient" with respect to the specification. - * + * * In particular, we ignore calls to {@link Socket#getTcpNoDelay()} and * {@link Socket#setTcpNoDelay(boolean)}. - * + * * @return A new, unbound socket. * @throws IOException if the operation fails. */ @@ -95,10 +95,10 @@ static AFTIPCSocket newInstance(AFTIPCSocketFactory factory) throws SocketExcept /** * Creates a new, unbound, "strict" {@link AFSocket}. - * + * * This call uses an implementation that tries to be closer to the specification than * {@link #newInstance()}, at least for some cases. - * + * * @return A new, unbound socket. * @throws IOException if the operation fails. */ @@ -108,7 +108,7 @@ public static AFTIPCSocket newStrictInstance() throws IOException { /** * Creates a new {@link AFSocket} and connects it to the given {@link AFTIPCSocketAddress}. - * + * * @param addr The address to connect to. * @return A new, connected socket. * @throws IOException if the operation fails. @@ -124,9 +124,9 @@ public AFTIPCSocketChannel getChannel() { /** * Very basic self-test function. - * + * * Prints "supported" and "capabilities" status to System.out. - * + * * @param args ignored. */ public static void main(String[] args) { @@ -149,7 +149,7 @@ public AFTIPCDestName getDestName() { /** * Retrieves the 16-byte node ID given a node hash. - * + * * @param peerId The node hash. * @return The node ID, or {@code null} if unsupported. * @throws IOException on error. @@ -171,7 +171,7 @@ public byte[] getNodeIdentity(AFTIPCSocketAddress address) throws IOException { /** * Retrieves the node ID given a node hash, as a hexadecimal string. - * + * * @param peerId The node hash. * @return The node ID, or {@code null} if unsupported. * @throws IOException on error. @@ -183,7 +183,7 @@ public static String getNodeIdHexString(int peerId) throws IOException { /** * Retrieves the link name given a node hash and a bearer ID. - * + * * @param peerId The node hash. * @param bearerId The bearer Id. * @return The link name, or {@code null} if unsupported. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java index a48b807d4..70c1cea39 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java @@ -22,7 +22,7 @@ /** * A selectable channel for stream-oriented connecting sockets. - * + * * @author Christian Kohlschütter */ public final class AFTIPCSocketChannel extends AFSocketChannel implements diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java index 8a082671e..cfe0fecea 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java @@ -22,14 +22,14 @@ /** * Defines certain methods that all junixsocket AF_TIPC socket implementations share and extend * beyond the standard socket API. - * + * * @author Christian Kohlschütter */ public interface AFTIPCSocketExtensions extends AFSocketExtensions { /** * Returns the TIPC "ErrInfo" information from the ancillary receive buffer (if any was set), or * {@code null} if no error was retrieved. - * + * * @return The ErrInfo. */ AFTIPCErrInfo getErrInfo(); @@ -37,7 +37,7 @@ public interface AFTIPCSocketExtensions extends AFSocketExtensions { /** * Returns the TIPC "DestName" information from the ancillary receive buffer (if any was set), or * {@code null} if no DestName was retrieved. - * + * * @return The service address or range (without scope) that was specified by the sender of the * message. */ diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java index 856a7acba..a275173ef 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java @@ -27,7 +27,7 @@ /** * The base for a SocketFactory that connects to TIPC sockets. - * + * * Typically, the "hostname" is used as a reference to a socketFile on the file system. The actual * mapping is left to the implementor. */ @@ -51,7 +51,7 @@ protected final AFTIPCSocket connectTo(AFTIPCSocketAddress addr) throws IOExcept /** * Performs some optional configuration on a newly created socket. - * + * * @param sock The socket. * @return The very socket. * @throws SocketException on error. @@ -62,7 +62,7 @@ protected AFTIPCSocket configure(AFTIPCSocket sock) throws SocketException { /** * Always connects sockets to the given TIPC type and instance. - * + * * @author Christian Kohlschütter */ public static class ServiceAddress extends AFTIPCSocketFactory { @@ -72,7 +72,7 @@ public static class ServiceAddress extends AFTIPCSocketFactory { /** * Creates an {@link AFTIPCSocketFactory} that always uses the given TIPC service type and * instance, implying cluster scope. - * + * * @param type The service type. * @param instance The service instance. */ diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java index b6254a9b7..305b379ba 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java @@ -27,14 +27,14 @@ /** * TIPC-specific socket options. - * + * * @author Christian Kohlschütter */ @NonNullByDefault public final class AFTIPCSocketOptions { /** * Use as value for {@link SocketOption}s of type {@link Void}. - * + * * @see #TIPC_GROUP_LEAVE */ @SuppressWarnings({"null"}) @@ -44,7 +44,7 @@ public final class AFTIPCSocketOptions { * This option governs how likely a message sent by the socket is to be affected by congestion. A * message with higher importance is less likely to be delayed due to link congestion and less * likely to be rejected due to receiver congestion. - * + * * @see MessageImportance */ public static final AFSocketOption TIPC_IMPORTANCE = new AFSocketOption<>( @@ -59,7 +59,7 @@ public final class AFTIPCSocketOptions { /** * This option governs the handling of a sent message if it cannot be delivered to its * destination. If set, the message is discarded; otherwise it is returned to the sender. - * + * * By default, this option is enabled for SOCK_RDM and SOCK_DGRAM sockets, and disabled otherwise. */ public static final AFSocketOption TIPC_DEST_DROPPABLE = new AFSocketOption<>( @@ -106,7 +106,7 @@ public final class AFTIPCSocketOptions { /** * Leave the previously joined communication group. - * + * * Only valid for setOption. The value is ignored. Use {@link #VOID}. */ public static final AFSocketOption TIPC_GROUP_LEAVE = new AFSocketOption<>( @@ -115,7 +115,7 @@ public final class AFTIPCSocketOptions { /** * When using TIPC_SOCK_RECVQ_DEPTH for getsockopt(), it returns the number of buffers in the * receive socket buffer which is not so helpful for user space applications. - * + * * TIPC_SOCK_RECVQ_USED returns the current allocated bytes of the receive socket buffer. This * helps user space applications dimension its buffer usage to avoid buffer overload issue. */ @@ -135,9 +135,9 @@ private AFTIPCSocketOptions() { /** * The TIPC message importance. - * + * * Messages with a higher importance have a lower chance of being dropped when congestion occurs. - * + * * @author Christian Kohlschütter */ public static final class MessageImportance extends NamedInteger implements @@ -182,7 +182,7 @@ private MessageImportance(String name, int id) { /** * Returns a {@link MessageImportance} instance for the given value. - * + * * @param v The value. * @return The instance. */ diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java index 139170e0f..970abd2a8 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java @@ -24,14 +24,14 @@ /** * A pair of sockets. - * + * * @param The socket type. * @author Christian Kohlschütter */ public final class AFTIPCSocketPair extends AFSocketPair { /** * Creates a new socket pair. - * + * * @param socket1 The first socket. * @param socket2 The second socket. */ @@ -41,7 +41,7 @@ protected AFTIPCSocketPair(T socket1, T socket2) { /** * Opens a socket pair of interconnected channels. - * + * * @return The new channel pair. * @throws IOException on error. */ @@ -51,7 +51,7 @@ public static AFTIPCSocketPair open() throws IOException { /** * Opens a socket pair of interconnected datagram channels. - * + * * @return The new channel pair. * @throws IOException on error. */ diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java index 3424515db..6031860f0 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java @@ -36,7 +36,7 @@ /** * A TIPC topology event received by the {@link AFTIPCTopologyWatcher} as a result of an * {@link AFTIPCTopologySubscription}. - * + * * @author Christian Kohlschütter */ @NonNullByDefault @@ -50,7 +50,7 @@ public final class AFTIPCTopologyEvent { /** * Some TIPC error code. - * + * * @author Christian Kohlschütter */ @SuppressWarnings("PMD.ShortClassName") @@ -94,7 +94,7 @@ private Type(String name, int id) { /** * Returns an {@link Type} instance given an integer. - * + * * @param v The value. * @return The instance. */ @@ -151,7 +151,7 @@ ByteBuffer writeToBuffer(ByteBuffer buf) throws IOException { /** * Converts this event message to a new {@link ByteBuffer}. - * + * * @return The new buffer, ready to read from. * @throws IOException on error. */ @@ -162,7 +162,7 @@ public ByteBuffer toBuffer() throws IOException { /** * The event type. - * + * * @return The type. */ public Type getType() { @@ -171,7 +171,7 @@ public Type getType() { /** * The found range's lower value. - * + * * @return The lower value. */ public int getFoundLower() { @@ -180,7 +180,7 @@ public int getFoundLower() { /** * The found range's upper value. - * + * * @return The upper value. */ public int getFoundUpper() { @@ -189,7 +189,7 @@ public int getFoundUpper() { /** * The corresponding socket address. - * + * * @return The socket address. */ @SuppressFBWarnings("EI_EXPOSE_REP") @@ -199,7 +199,7 @@ public AFTIPCSocketAddress getAddress() { /** * The corresponding subscription that found this event. - * + * * @return The subscription. */ @SuppressFBWarnings("EI_EXPOSE_REP") @@ -209,7 +209,7 @@ public AFTIPCTopologySubscription getSubscription() { /** * Returns {@code true} iff the event type is {@link Type#TIPC_PUBLISHED}. - * + * * @return {@code true} if this a "published" event. */ public boolean isPublished() { @@ -218,7 +218,7 @@ public boolean isPublished() { /** * Returns {@code true} iff the event type is {@link Type#TIPC_WITHDRAWN}. - * + * * @return {@code true} if this a "withdrawn" event. */ public boolean isWithdrawn() { @@ -227,7 +227,7 @@ public boolean isWithdrawn() { /** * Returns {@code true} iff the event type is {@link Type#TIPC_SUBSCR_TIMEOUT}. - * + * * @return {@code true} if this a "timeout" event. */ public boolean isTimeout() { @@ -237,7 +237,7 @@ public boolean isTimeout() { /** * Returns {@code true} iff the corresponding subscription has the * {@link AFTIPCTopologySubscription.Flags#TIPC_SUB_PORTS} flag set. - * + * * @return {@code true} if this a event referring to a "port" subscription. */ public boolean isPort() { @@ -247,7 +247,7 @@ public boolean isPort() { /** * Returns {@code true} iff the corresponding subscription has the * {@link AFTIPCTopologySubscription.Flags#TIPC_SUB_SERVICE} flag set. - * + * * @return {@code true} if this a event referring to a "service" subscription. */ public boolean isService() { @@ -257,7 +257,7 @@ public boolean isService() { /** * Returns {@code true} iff the corresponding subscription has the * {@link AFTIPCTopologySubscription.Flags#TIPC_SUB_CANCEL} flag set. - * + * * @return {@code true} if this a event referring to a "cancellation" subscription request. */ public boolean isCancellationRequest() { @@ -287,9 +287,9 @@ public boolean equals(@Nullable Object obj) { * Returns the link name for a link state event requested by * {@link AFTIPCTopologySubscription#TIPC_LINK_STATE} or * {@link AFTIPCTopologyWatcher#addLinkStateSubscription()}. - * + * * A link name is something like "f875a40e707d:eth0-8c1645f2ce27:eth0" - * + * * @return The link name, or {@code null} if unsupported. * @throws IOException on error. */ diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java index 2cfa0dbb2..4f3b401f3 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java @@ -34,7 +34,7 @@ /** * An "event subscription" to be used with {@link AFTIPCTopologyWatcher}. - * + * * @author Christian Kohlschütter */ @NonNullByDefault @@ -51,7 +51,7 @@ public final class AFTIPCTopologySubscription { /** * The "node state" cluster topology monitor mode. - * + * * When TIPC establishes contact with another node, it does internally create a binding {type = * TIPC_NODE_STATE, instance = peer node hash number} in the binding table. This makes it possible * for applications on a node to keep track of reachable peer nodes at any time. * @@ -60,11 +60,11 @@ public final class AFTIPCTopologySubscription { /** * The "link state" cluster connectivity monitor mode. - * + * * When TIPC establishes a new link to another node, it does internally create a binding {type = * TIPC_LINK_STATE, instance = peer node hash number} in the binding table. This makes it possible * for applications on a node to keep track of working links to peer nodes at any time. - * + * * This type of binding differs from the topology subscription binding ({@link #TIPC_NODE_STATE}) * in that there may be two links, and hence two bindings, to keep track of for each peer node. * Although this binding type only is published with node visibility, it is possible to combine it @@ -120,7 +120,7 @@ private Flags(@Nullable String name, int flags) { /** * Returns a {@link Flags} instance given an integer value. - * + * * @param v The value. * @return The instance. */ @@ -131,7 +131,7 @@ public static Flags ofValue(int v) { /** * Returns a {@link Flags} instance representing the combination of the given list of * {@link Flags} flags. - * + * * @param flags The flags (zero or more values). * @return The instance. */ @@ -141,7 +141,7 @@ public static Flags withFlags(@NonNull Flags... flags) { /** * Combines the given {@link Flags} instance with another one. - * + * * @param other The other instance. * @return The combined instance. */ @@ -153,7 +153,7 @@ public Flags combineWith(Flags other) { /** * Creates a new subscription message that does not time out. - * + * * @param type The service type (any service, particularly {@link #TIPC_NODE_STATE} and * {@link #TIPC_LINK_STATE}. * @param lower The lower instance. @@ -166,7 +166,7 @@ public AFTIPCTopologySubscription(int type, int lower, int upper, Flags flags) { /** * Creates a new subscription message. - * + * * @param type The service type (any service, particularly {@link #TIPC_NODE_STATE} and * {@link #TIPC_LINK_STATE}. * @param lower The lower instance. @@ -182,7 +182,7 @@ public AFTIPCTopologySubscription(int type, int lower, int upper, Flags flags, /** * Creates a new subscription message. - * + * * @param type The service type (any service, particularly {@link #TIPC_NODE_STATE} and * {@link #TIPC_LINK_STATE}. * @param lower The lower instance. @@ -244,7 +244,7 @@ ByteBuffer writeToBuffer(ByteBuffer buf) { /** * Converts this subscription message to a new {@link ByteBuffer}. - * + * * @return The new buffer, ready to read from. */ @SuppressWarnings({"null", "cast"}) @@ -261,9 +261,9 @@ public String toString() { /** * Creates an {@link AFTIPCTopologySubscription} that cancels this subscription. - * + * * Note that a cancellation cannot be cancelled again. - * + * * @return The new {@link AFTIPCTopologySubscription}. */ public AFTIPCTopologySubscription toCancellation() { @@ -295,7 +295,7 @@ public boolean equals(@Nullable Object obj) { /** * Returns the service type. - * + * * @return The type. */ public int getType() { @@ -304,7 +304,7 @@ public int getType() { /** * Returns the lower instance value. - * + * * @return The lower instance value. */ public int getLower() { @@ -313,7 +313,7 @@ public int getLower() { /** * Returns the upper instance value. - * + * * @return The upper instance value. */ public int getUpper() { @@ -322,7 +322,7 @@ public int getUpper() { /** * Returns the flags. - * + * * @return The flags. */ public Flags getFlags() { @@ -331,7 +331,7 @@ public Flags getFlags() { /** * Returns the timeout, in seconds (or {@link #TIPC_WAIT_FOREVER} for "never timeout"). - * + * * @return The timeout. */ public int getTimeout() { @@ -340,7 +340,7 @@ public int getTimeout() { /** * Returns the 8-byte user handle. - * + * * @return The user handle. */ public byte[] getUsrHandle() { @@ -350,7 +350,7 @@ public byte[] getUsrHandle() { /** * Returns {@code true} iff the subscription has the * {@link AFTIPCTopologySubscription.Flags#TIPC_SUB_PORTS} flag set. - * + * * @return {@code true} if this is a "port" subscription. */ public boolean isPort() { @@ -360,7 +360,7 @@ public boolean isPort() { /** * Returns {@code true} iff the subscription has the * {@link AFTIPCTopologySubscription.Flags#TIPC_SUB_SERVICE} flag set. - * + * * @return {@code true} if this is a "service" subscription. */ public boolean isService() { @@ -370,7 +370,7 @@ public boolean isService() { /** * Returns {@code true} iff the subscription has the * {@link AFTIPCTopologySubscription.Flags#TIPC_SUB_CANCEL} flag set. - * + * * @return {@code true} if this is a "cancellation" subscription request. */ public boolean isCancellation() { diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java index e5c58b545..9112dc3c3 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java @@ -29,7 +29,7 @@ /** * Provides access to the TIPC topology service. - * + * * @author Christian Kohlschütter */ public class AFTIPCTopologyWatcher implements Closeable { @@ -42,7 +42,7 @@ public class AFTIPCTopologyWatcher implements Closeable { /** * Creates an {@link AFTIPCTopologyWatcher} whose subscription requests do not time out by * default. - * + * * @throws IOException on error. */ public AFTIPCTopologyWatcher() throws IOException { @@ -52,7 +52,7 @@ public AFTIPCTopologyWatcher() throws IOException { /** * Creates an {@link AFTIPCTopologyWatcher} whose subscription requests use the given default * timeout. - * + * * @param defaultTimeoutSeconds The timeout in seconds (or * {@link AFTIPCTopologySubscription#TIPC_WAIT_FOREVER}; * @throws IOException on error. @@ -67,7 +67,7 @@ public AFTIPCTopologyWatcher(int defaultTimeoutSeconds) throws IOException { /** * Watches for all port changes. - * + * * @return The subscription object. * @throws IOException on error. * @see #cancelSubscription(AFTIPCTopologySubscription) @@ -78,7 +78,7 @@ public final AFTIPCTopologySubscription addPortSubscription() throws IOException /** * Watches for port changes of the given port ("port" meaning TIPC port, not TCP). - * + * * @param port The port. * @return The subscription object. * @throws IOException on error. @@ -90,7 +90,7 @@ public final AFTIPCTopologySubscription addPortSubscription(int port) throws IOE /** * Watches for port changes within the given range ("port" meaning TIPC port, not TCP). - * + * * @param lower The lower value of the port range. * @param upper The upper value of the port range. * @return The subscription object. @@ -106,7 +106,7 @@ public final AFTIPCTopologySubscription addPortSubscription(int lower, int upper /** * Watches for all link state changes. - * + * * @return The subscription object. * @throws IOException on error. * @see #cancelSubscription(AFTIPCTopologySubscription) @@ -119,7 +119,7 @@ public final AFTIPCTopologySubscription addLinkStateSubscription() throws IOExce /** * Watches for service changes of the given service type, matching any instance. - * + * * @param type The service type. * @return The subscription object. * @throws IOException on error. @@ -131,7 +131,7 @@ public final AFTIPCTopologySubscription addServiceSubscription(int type) throws /** * Watches for service changes of the given service type, matching only the specified instance. - * + * * @param type The service type. * @param instance The instance to match. * @return The subscription object. @@ -145,7 +145,7 @@ public final AFTIPCTopologySubscription addServiceSubscription(int type, int ins /** * Watches for service changes of the given service type and instance range. - * + * * @param type The service type. * @param lower The lower value of the instance range. * @param upper The upper value of the instance range. @@ -162,7 +162,7 @@ public final AFTIPCTopologySubscription addServiceSubscription(int type, int low /** * Cancels a previously added service subscription. - * + * * @param sub The subscription to cancel. * @throws IOException on error. */ @@ -175,7 +175,7 @@ public final void cancelSubscription(AFTIPCTopologySubscription sub) throws IOEx * need to do this directly; use the * {@code #addPortSubscription(int, int)}/{@link #cancelSubscription(AFTIPCTopologySubscription)} * methods instead. - * + * * @param sub The subscription message. * @return The very message. * @throws IOException on error. @@ -188,9 +188,9 @@ public final AFTIPCTopologySubscription sendMessage(AFTIPCTopologySubscription s /** * Runs a receive loop until {@link #stopLoop()} or {@link #close()} is called. - * + * * This method returns after the run loop terminates. - * + * * @throws IOException on error. */ @SuppressWarnings("null") @@ -225,7 +225,7 @@ public final void runLoop() throws IOException { /** * Called for every event encountered by the run loop. - * + * * @param event The event. * @throws IOException on error. Any exception will terminate the run loop. * @see #runLoop() @@ -235,7 +235,7 @@ protected void onEvent(AFTIPCTopologyEvent event) throws IOException { /** * Called upon {@link #close()}. - * + * * @throws IOException on error. */ protected void onClose() throws IOException { @@ -243,7 +243,7 @@ protected void onClose() throws IOException { /** * Checks if the watcher run loop is running. - * + * * @return {@code true} if running. * @see #runLoop() */ diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java index deed7496d..b7dad98ca 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java @@ -29,7 +29,7 @@ /** * Provides references to all "junixsocket-tipc" tests that should be included in * junixsocket-selftest. - * + * * @author Christian Kohlschütter */ @SuppressWarnings("PMD.CouplingBetweenObjects") diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java index ad5d9b803..e1af5a6a0 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java @@ -28,7 +28,7 @@ /** * Tests some otherwise uncovered methods of {@link AFTIPCSocket}. - * + * * @author Christian Kohlschütter */ @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_TIPC) diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java index e099f5273..9d5f184d1 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java @@ -26,7 +26,7 @@ /** * A {@link DatagramChannel} implementation that works with {@code AF_VSOCK} sockets. - * + * * @author Christian Kohlschütter */ public final class AFVSOCKDatagramChannel extends AFDatagramChannel implements diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java index f9968389a..2a6ad14cb 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java @@ -27,7 +27,7 @@ /** * A {@link DatagramSocket} implementation that works with {@code AF_VSOCK} sockets. - * + * * @author Christian Kohlschütter */ public final class AFVSOCKDatagramSocket extends AFDatagramSocket implements @@ -53,7 +53,7 @@ protected AFVSOCKDatagramChannel newChannel() { /** * Returns a new {@link AFVSOCKDatagramSocket} instance, using the default * {@link AFSocketType#SOCK_DGRAM} socket type. - * + * * @return The new instance. * @throws IOException on error. */ @@ -63,7 +63,7 @@ public static AFVSOCKDatagramSocket newInstance() throws IOException { /** * Returns a new {@link AFVSOCKDatagramSocket} instance for the given socket type. - * + * * @param socketType The socket type. * @return The new instance. * @throws IOException on error. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java index cc1531dd5..75aa8181e 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java @@ -21,7 +21,7 @@ /** * Describes the protocol families supported by junixsocket-vsock. - * + * * @author Christian Kohlschütter */ public enum AFVSOCKProtocolFamily implements ProtocolFamily { diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java index 5c15c146b..8e5672be0 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java @@ -30,7 +30,7 @@ /** * Provides access to AF_VSOCK connections that aren't directly accessible but exposed via a * proxying/multiplexing Unix domain socket. - * + * * @author Christian Kohlschütter * @see #openFirecrackerStyleConnector(File, int) * @see #openDirectConnector() @@ -59,7 +59,7 @@ private AFVSOCKProxyServerSocketConnector(String listenAddressPrefix, int allowe * Returns an instance that is configured to support * [Firecracker-style](https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md) * Unix domain sockets. - * + * * @param listenAddressPrefix The prefix of any listening socket. The actual socket will have * _vsockPort appended to it (with {@code vsockPort} being replaced * by the corresponding port number). @@ -73,7 +73,7 @@ public static AFServerSocketConnector ope /** * Returns an instance that is configured to connect directly to the given address. - * + * * @return The direct instance. */ public static AFServerSocketConnector openDirectConnector() { diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java index 7fec34707..6ab6be9d4 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java @@ -36,7 +36,7 @@ /** * Provides access to AF_VSOCK connections that aren't directly accessible but exposed via a * proxying/multiplexing Unix domain socket. - * + * * @author Christian Kohlschütter * @see #openFirecrackerStyleConnector(AFUNIXSocketAddress, int) * @see #openDirectConnector() @@ -67,7 +67,7 @@ private AFVSOCKProxySocketConnector(AFUNIXSocketAddress connectorAddress, int al * Returns an instance that is configured to support * [Firecracker-style](https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md) * Unix domain sockets. - * + * * @param connectorAddress The unix socket address pointing at the Firecracker-style multiplexing * domain socket. * @param allowedCID The permitted CID, or {@link AFVSOCKSocketAddress#VMADDR_CID_ANY} for "any". @@ -80,7 +80,7 @@ public static AFSocketConnector openFirec /** * Returns an instance that is configured to connect directly to the given address. - * + * * @return The direct instance. */ public static AFSocketConnector openDirectConnector() { @@ -89,7 +89,7 @@ public static AFSocketConnector openDirec /** * Connects to the given AF_VSOCK address. - * + * * @param vsockAddress The address to connect to. * @return The connected socket. * @throws IOException on error. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java index 82f450ff0..6fb5a877e 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java @@ -99,7 +99,7 @@ private AFVSOCKSelectorProvider() { /** * Returns the singleton instance. - * + * * @return The instance. */ @SuppressFBWarnings("MS_EXPOSE_REP") @@ -109,7 +109,7 @@ public static AFVSOCKSelectorProvider getInstance() { /** * Returns the singleton instance. - * + * * @return The instance. */ public static AFVSOCKSelectorProvider provider() { @@ -118,7 +118,7 @@ public static AFVSOCKSelectorProvider provider() { /** * Constructs a new socket pair from two sockets. - * + * * @param s1 Some socket, the first one. * @param s2 Some socket, the second one. * @return The pair. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java index 01e20431a..defd2da03 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java @@ -30,7 +30,7 @@ /** * The server part of an {@code AF_VSOCK} socket. - * + * * @author Christian Kohlschütter */ public class AFVSOCKServerSocket extends AFServerSocket { @@ -50,7 +50,7 @@ public AFVSOCKServerSocketChannel getChannel() { /** * Returns a new, unbound AF_VSOCK {@link ServerSocket}. - * + * * @return The new, unbound {@link AFServerSocket}. * @throws IOException if the operation fails. */ @@ -67,7 +67,7 @@ static AFVSOCKServerSocket newInstance(FileDescriptor fdObj, int localPort, int /** * Returns a new AF_VSOCK {@link ServerSocket} that is bound to the given * {@link AFVSOCKSocketAddress}. - * + * * @param addr The socket file to bind to. * @return The new, bound {@link AFServerSocket}. * @throws IOException if the operation fails. @@ -78,7 +78,7 @@ public static AFVSOCKServerSocket bindOn(final AFVSOCKSocketAddress addr) throws /** * Returns a new AF_VSOCK {@link ServerSocket} that is bound to the given {@link AFSocketAddress}. - * + * * @param addr The socket file to bind to. * @param deleteOnClose If {@code true}, the socket file (if the address points to a file) will be * deleted upon {@link #close}. @@ -94,7 +94,7 @@ public static AFVSOCKServerSocket bindOn(final AFVSOCKSocketAddress addr, boolea /** * Returns a new, unbound AF_VSOCK {@link ServerSocket} that will always bind to the * given address, regardless of any socket address used in a call to bind. - * + * * @param forceAddr The address to use. * @return The new, yet unbound {@link AFServerSocket}. * @throws IOException if an exception occurs. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java index 5e1ed3d0a..3add33358 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java @@ -24,7 +24,7 @@ /** * A selectable channel for stream-oriented listening sockets. - * + * * @author Christian Kohlschütter */ public final class AFVSOCKServerSocketChannel extends AFServerSocketChannel { diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java index c6d32d643..6bf4b4f27 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java @@ -30,7 +30,7 @@ /** * Implementation of an {@code AF_VSOCK} socket. - * + * * @author Christian Kohlschütter */ public final class AFVSOCKSocket extends AFSocket implements @@ -55,13 +55,13 @@ private static synchronized AFVSOCKSocketImplExtensions getStaticImplExtensions( /** * Returns true iff {@link AFVSOCKSocket}s (sockets of type "AF_VSOCK") are supported * by the current Java VM and the kernel. - * + * * To support {@link AFVSOCKSocket}s, a custom JNI library must be loaded that is supplied with * junixsocket, and the system must support AF_VSOCK sockets. - * + * * This call is equivalent to checking {@link AFSocket#isSupported()} and * {@link AFSocket#supports(AFSocketCapability)} with {@link AFSocketCapability#CAPABILITY_VSOCK}. - * + * * @return {@code true} iff supported. */ public static boolean isSupported() { @@ -75,12 +75,12 @@ protected AFVSOCKSocketChannel newChannel() { /** * Creates a new, unbound {@link AFSocket}. - * + * * This "default" implementation is a bit "lenient" with respect to the specification. - * + * * In particular, we ignore calls to {@link Socket#getTcpNoDelay()} and * {@link Socket#setTcpNoDelay(boolean)}. - * + * * @return A new, unbound socket. * @throws IOException if the operation fails. */ @@ -94,10 +94,10 @@ static AFVSOCKSocket newInstance(AFVSOCKSocketFactory factory) throws SocketExce /** * Creates a new, unbound, "strict" {@link AFSocket}. - * + * * This call uses an implementation that tries to be closer to the specification than * {@link #newInstance()}, at least for some cases. - * + * * @return A new, unbound socket. * @throws IOException if the operation fails. */ @@ -107,7 +107,7 @@ public static AFVSOCKSocket newStrictInstance() throws IOException { /** * Creates a new {@link AFSocket} and connects it to the given {@link AFVSOCKSocketAddress}. - * + * * @param addr The address to connect to. * @return A new, connected socket. * @throws IOException if the operation fails. @@ -123,7 +123,7 @@ public AFVSOCKSocketChannel getChannel() { /** * Returns the local CID. - * + * * If the system does not support vsock, or status about support cannot be retrieved, -1 * ({@link AFVSOCKSocketAddress#VMADDR_CID_ANY}) is returned. The value may be cached upon * initialization of the library. @@ -137,9 +137,9 @@ public static int getLocalCID() throws IOException { /** * Very basic self-test function. - * + * * Prints "supported" and "capabilities" status to System.out. - * + * * @param args ignored. */ public static void main(String[] args) { diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java index 1b42310f7..d967b5f3f 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java @@ -22,7 +22,7 @@ /** * A selectable channel for stream-oriented connecting sockets. - * + * * @author Christian Kohlschütter */ public final class AFVSOCKSocketChannel extends AFSocketChannel implements diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java index 343a53821..5a823a146 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java @@ -22,7 +22,7 @@ /** * Defines certain methods that all junixsocket AF_VSOCK socket implementations share and extend * beyond the standard socket API. - * + * * @author Christian Kohlschütter */ public interface AFVSOCKSocketExtensions extends AFSocketExtensions { diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java index 2936062d3..38a3055b7 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java @@ -49,7 +49,7 @@ protected final AFVSOCKSocket connectTo(AFVSOCKSocketAddress addr) throws IOExce /** * Performs some optional configuration on a newly created socket. - * + * * @param sock The socket. * @return The very socket. * @throws SocketException on error. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java index 758e18e7f..e619c1ac7 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java @@ -24,7 +24,7 @@ /** * VSOCK-specific socket options. - * + * * @author Christian Kohlschütter */ @NonNullByDefault diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java index 079c8538b..87cbbb79d 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java @@ -24,14 +24,14 @@ /** * A pair of sockets. - * + * * @param The socket type. * @author Christian Kohlschütter */ public final class AFVSOCKSocketPair extends AFSocketPair { /** * Creates a new socket pair. - * + * * @param socket1 The first socket. * @param socket2 The second socket. */ @@ -41,7 +41,7 @@ protected AFVSOCKSocketPair(T socket1, T socket2) { /** * Opens a socket pair of interconnected channels. - * + * * @return The new channel pair. * @throws IOException on error. */ @@ -51,7 +51,7 @@ public static AFVSOCKSocketPair open() throws IOException /** * Opens a socket pair of interconnected datagram channels. - * + * * @return The new channel pair. * @throws IOException on error. */ diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java index 331cc59e3..fb0888d51 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java @@ -29,7 +29,7 @@ /** * Provides references to all "junixsocket-vsock" tests that should be included in * junixsocket-selftest. - * + * * @author Christian Kohlschütter */ @SuppressWarnings("PMD.CouplingBetweenObjects") diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java index da2808600..3e2592cb0 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java @@ -28,7 +28,7 @@ /** * Tests some otherwise uncovered methods of {@link AFVSOCKSocket}. - * + * * @author Christian Kohlschütter */ @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_VSOCK) From c3af0910a5108428ad27bc66426ffd36cb8aa601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 13 Nov 2022 18:26:10 +0100 Subject: [PATCH 011/768] CodeQL: Use snapshots --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d6ebdbc41..c0b387324 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -54,7 +54,7 @@ jobs: - run: | echo "Build junixsocket with Maven (no tests)" - mvn clean install -Pcodeql -Pstrict + mvn clean install -Pcodeql -Pstrict -Puse-snapshots - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From bed2f1490acb84fba8a329bf82e5826dda284ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 13 Nov 2022 20:25:19 +0100 Subject: [PATCH 012/768] mvn formatter:format, also for java8 code --- .../main/java8/org/newsclub/net/unix/AFOutputStream.java | 4 ++-- .../java8/org/newsclub/net/unix/DatagramSocketImplShim.java | 2 +- .../main/java8/org/newsclub/net/unix/SocketImplShim.java | 2 +- .../src/test/java8/org/newsclub/net/unix/FinalizeTest.java | 6 +++--- .../org/newsclub/net/unix/StandardSocketOptionsTest.java | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java index 4523aa88f..d88fcb522 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java @@ -16,11 +16,11 @@ public abstract class AFOutputStream extends OutputStream implements FileDescrip * Reads all bytes from the given input stream and writes the bytes to this output stream in the * order that they are read. On return, this input stream will be at end of stream. This method * does not close either stream. - * + * * This method effectively is the reverse notation of * {@link InputStream#transferTo(OutputStream)}, which may or may not be optimized for * {@link AFSocket}s. - * + * * @param in The {@link InputStream} to transfer from. * @return The number of bytes transferred. * @throws IOException on error. diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java index 3bdb3ac43..67bf87be6 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java @@ -4,7 +4,7 @@ /** * A shim that is filled with Java version-specific overrides. This variant is for Java 7 and 8. - * + * * @author Christian Kohlschütter */ abstract class DatagramSocketImplShim extends DatagramSocketImpl { diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java index d5e3d8963..84cd22f4c 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java @@ -8,7 +8,7 @@ /** * A shim that is filled with Java version-specific overrides. This variant is for Java 7 and 8. - * + * * @author Christian Kohlschütter */ abstract class SocketImplShim extends SocketImpl { diff --git a/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java b/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java index 7fdfabd30..c4dd0d538 100644 --- a/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java +++ b/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java @@ -28,7 +28,7 @@ /** * Not supported on Java 8 yet, but you can manually verify that it works by running the following * commands from three different shells: - * + * *
    *
  1. (shell 1) {@code nc -l -U /tmp/testsocket}
  2. *
  3. (shell 2) {@code java -Dtest.junixsocket.socket=/tmp/testsocket @@ -37,10 +37,10 @@ *
  4. (shell 1) type some text, followed by enter
  5. *
  6. (shell 3) {@code lsof -U -a -p $(jps | grep FinalizeTestClient | cut -f 1 -d' ') | wc -l} *
- * + * * The number printed in shell 3 after the second {@code lsof} commands should be one less than the * one of the first {@code lsof} command. - * + * * See
issue 29 for details. */ public abstract class FinalizeTest extends SocketTestBase { diff --git a/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java b/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java index d0e9448ef..1fe4af08c 100644 --- a/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java +++ b/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java @@ -9,10 +9,10 @@ /** * Tests the {@code Socket#getOption(SocketOption)} API available since Java 9. - * + * * This class (in src/test/java8) is a stub that overrides this type so we can compile for Java 8 * and, at the same time, acknowledge the absence of the test programmatically in jUnit. - * + * * @author Christian Kohlschütter */ public abstract class StandardSocketOptionsTest extends SocketTestBase { From f5ac19103b4c6245d89ce388af97bd95b97120bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Tue, 15 Nov 2022 14:37:27 +0100 Subject: [PATCH 013/768] AFSocketServerConnector: add mayStopServerForce This allows stopping the jetty server even if other Connectors are present. --- .../unix/jetty/AFSocketServerConnector.java | 85 +++++++++++-------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java index 7227cf3c5..68098af07 100644 --- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java +++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java @@ -49,9 +49,8 @@ import java.nio.file.Path; import java.util.EventListener; import java.util.Locale; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicReference; import org.eclipse.jetty.io.ArrayByteBufferPool; @@ -100,6 +99,7 @@ public class AFSocketServerConnector extends AbstractConnector { private int acceptedSendBufferSize; private boolean mayStopServer = false; + private boolean mayStopServerForce = false; private final Class selectorManagerListenerClass; private final Server server; @@ -342,45 +342,35 @@ protected void accept(int acceptorID) throws IOException { takenOver = !((AFServerSocketChannel) sc).isLocalSocketAddressValid(); } - if (takenOver) { - ExecutorService es = Executors.newSingleThreadExecutor(); - try { - LOG.warn("Another server has taken over our address"); - es.execute(() -> { - Connector[] connectors = server.getConnectors(); - - boolean shutdownServer; - if (connectors == null) { - shutdownServer = true; - } else { - shutdownServer = true; - for (Connector conn : connectors) { - if (conn != AFSocketServerConnector.this && conn.isRunning()) { // NOPMD.CompareObjectsWithEquals - shutdownServer = false; - break; - } - } - } - - if (shutdownServer && mayStopServer) { - LOG.warn("Server has no other connectors; shutting down: " + server); // NOPMD - - try { - server.stop(); - } catch (Exception e1) { - LOG.warn("Exception upon stopping " + server, e1); // NOPMD - } - } - }); - } finally { - es.shutdown(); - } + if (takenOver && isMayStopServer()) { + LOG.warn("Another server has taken over our address"); + CompletableFuture.runAsync(this::checkServerStop); } throw (ClosedByInterruptException) new ClosedByInterruptException().initCause(e); } } } + private void checkServerStop() { + Connector[] connectors = server.getConnectors(); + + if (connectors != null && !isMayStopServerForce()) { + for (Connector conn : connectors) { + if (conn != AFSocketServerConnector.this && conn.isRunning()) { // NOPMD.CompareObjectsWithEquals + return; // don't stop + } + } + } + + LOG.warn("Server has no other connectors; shutting down: " + server); // NOPMD + + try { + server.stop(); + } catch (Exception e1) { + LOG.warn("Exception upon stopping " + server, e1); // NOPMD + } + } + private void accepted(SocketChannel channel) throws IOException { channel.configureBlocking(false); configure(channel); @@ -551,4 +541,29 @@ public boolean isMayStopServer() { public void setMayStopServer(boolean mayStopServer) { this.mayStopServer = mayStopServer; } + + /** + * Checks if this connector may stop the server when it's no longer able to serve, even if other + * connectors are available. + * + * @return {@code true} if so. + */ + @ManagedAttribute("Whether this connector may stop the server when it's no longer able to" + + " serve, even if other connectors are available") + public boolean isMayStopServerForce() { + return mayStopServerForce; + } + + /** + * Sets if this connector may stop the server when it's no longer able to serve and no other + * connectors are available. + * + * @param b {@code true} if so (which then also implies {@code setMayStopServer(true)} + */ + public void setMayStopServerForce(boolean b) { + if (b) { + setMayStopServer(true); + } + this.mayStopServerForce = b; + } } From bc45252e0cd9e00d7c66f17a55c6d4b9ec39e224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Tue, 15 Nov 2022 20:09:29 +0100 Subject: [PATCH 014/768] mysql-connector-j has moved and a new name --- junixsocket-mysql/pom.xml | 5 +++-- src/site/markdown/dependency.md | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index 2fc0abaf5..d98ebfe2c 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -23,8 +23,9 @@ ${project.version} - mysql - mysql-connector-java + + com.mysql + mysql-connector-j 8.0.31 provided diff --git a/src/site/markdown/dependency.md b/src/site/markdown/dependency.md index 4599b18a4..411e0c59a 100644 --- a/src/site/markdown/dependency.md +++ b/src/site/markdown/dependency.md @@ -182,12 +182,12 @@ databases such as PostgreSQL. ### MySQL -Make sure that the following jars are on your classpath: +If you can't use Maven (instructions above), make sure that the following jars are on your classpath: * junixsocket-common-2.6.1.jar * junixsocket-mysql-2.6.1.jar - * mysql-connector-java-8.0.14.jar (or newer; earlier versions should work, too) - * (typically, omit if you use the custom library below) junixsocket-native-common-2.6.1.jar + * mysql-connector-j-8.0.31.jar (or newer) + * (typically required; can be skipped if you use the custom library below) junixsocket-native-common-2.6.1.jar * (optionally, if you have a custom architecture) junixsocket-native-custom-2.6.1.jar Use the following connection properties (along with `user`, `password`, and other properties you may From eb1e1cfeaaf8c35aba54493567fd9140b02c3ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 17 Nov 2022 17:28:09 +0100 Subject: [PATCH 015/768] Upgrade XCode project --- .../project.pbxproj | 94 +++++++++++-------- .../xcschemes/All Architectures.xcscheme | 2 +- .../xcschemes/aarch64-linux-gnu.xcscheme | 2 +- .../xcschemes/aarch64-w64-mingw32.xcscheme | 2 +- .../amd64-unknown-openbsd6.9.xcscheme | 2 +- .../xcschemes/arm64-apple-macos11.xcscheme | 2 +- .../xcschemes/armv6--linux-gnueabihf.xcscheme | 2 +- .../xcshareddata/xcschemes/current.xcscheme | 2 +- .../i386-pc-solaris2.11_m64.xcscheme | 2 +- .../xcschemes/powerpc-ibm-aix7.2.xcscheme | 2 +- .../xcschemes/powerpc-ibm-os400.xcscheme | 2 +- .../xcschemes/powerpc64le-linux-gnu.xcscheme | 2 +- .../xcschemes/riscv64-redhat-linux.xcscheme | 2 +- .../xcschemes/s390x-ibm-linux-gnu.xcscheme | 2 +- .../xcschemes/sparc-sun-solaris2.11.xcscheme | 2 +- .../x86_64-alpine-linux-musl.xcscheme | 2 +- .../x86_64-apple-darwin18.2.0.xcscheme | 2 +- .../x86_64-portbld-dragonfly6.0.xcscheme | 2 +- .../x86_64-unknown-freebsd12.1.xcscheme | 2 +- .../x86_64-unknown-linux-gnu.xcscheme | 2 +- .../x86_64-unknown-netbsd9.0.xcscheme | 2 +- .../xcschemes/x86_64-w64-mingw32.xcscheme | 2 +- 22 files changed, 74 insertions(+), 62 deletions(-) diff --git a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj index a1bb6f52a..9737a7bde 100644 --- a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj +++ b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj @@ -2551,7 +2551,7 @@ 43D436B0261A55D0002D0C12 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1320; + LastUpgradeCheck = 1410; TargetAttributes = { 432EF186261AD52100F4A583 = { CreatedOnToolsVersion = 11.3.1; @@ -3314,7 +3314,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3343,7 +3343,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3369,6 +3369,7 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_STYLE = Automatic; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -3378,6 +3379,7 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_STYLE = Automatic; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -3390,7 +3392,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3415,7 +3417,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3440,7 +3442,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3470,7 +3472,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3500,7 +3502,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3527,7 +3529,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3554,7 +3556,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3580,7 +3582,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3606,7 +3608,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3631,7 +3633,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3656,7 +3658,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3681,7 +3683,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3706,7 +3708,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3735,7 +3737,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3764,7 +3766,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3789,7 +3791,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3810,12 +3812,13 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; CROSSCLANG_TARGET = "x86_64-apple-darwin18.2.0"; EXECUTABLE_EXTENSION = dylib; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; LLVM_LTO = YES; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3837,12 +3840,13 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; CROSSCLANG_TARGET = "x86_64-apple-darwin18.2.0"; EXECUTABLE_EXTENSION = dylib; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; LLVM_LTO = YES; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3864,11 +3868,12 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; CROSSCLANG_TARGET = current; EXECUTABLE_EXTENSION = dylib; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3888,11 +3893,12 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; CROSSCLANG_TARGET = current; EXECUTABLE_EXTENSION = dylib; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3916,7 +3922,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3947,7 +3953,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -3983,7 +3989,7 @@ ); LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4019,7 +4025,7 @@ ); LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4057,7 +4063,7 @@ ); LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4094,7 +4100,7 @@ ); LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4126,7 +4132,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4152,7 +4158,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4178,7 +4184,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4203,7 +4209,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4228,7 +4234,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4254,7 +4260,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4281,7 +4287,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-fno-lto", @@ -4314,7 +4320,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-fno-lto", @@ -4342,11 +4348,12 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; CROSSCLANG_TARGET = "arm64-apple-macos11"; EXECUTABLE_EXTENSION = dylib; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4366,11 +4373,12 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; CROSSCLANG_TARGET = "arm64-apple-macos11"; EXECUTABLE_EXTENSION = dylib; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4414,6 +4422,7 @@ CODE_SIGN_STYLE = Manual; COMPILER_INDEX_STORE_ENABLE = NO; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; EXECUTABLE_PREFIX = "libjunixsocket-"; @@ -4430,6 +4439,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = src/main/c/jni; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-fno-strict-overflow", @@ -4495,6 +4505,7 @@ CODE_SIGN_STYLE = Manual; COMPILER_INDEX_STORE_ENABLE = NO; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; EXECUTABLE_PREFIX = "libjunixsocket-"; GCC_CW_ASM_SYNTAX = NO; @@ -4509,6 +4520,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = src/main/c/jni; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-fno-strict-overflow", @@ -4554,7 +4566,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", @@ -4586,7 +4598,7 @@ EXECUTABLE_EXTENSION = so; LD_DEPENDENCY_INFO_FILE = ""; LD_LTO_OBJECT_FILE = ""; - MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; OTHER_CFLAGS = ( "$(inherited)", "-target", diff --git a/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme b/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme index 9f879e63b..9c89240bf 100644 --- a/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme +++ b/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 17 Nov 2022 17:30:55 +0100 Subject: [PATCH 016/768] AFCore: Fix potential hang in send When using non-direct ByteBuffers (the default), sending data to a socket may cause an infinite loop. This is caused by an incorrect position calculation in case the position of the ByteBuffer that is to be written is different from the position of the ThreadLocal-provided ByteBuffer (usually when the position != 0). This in turn may cause the native code around send(2) to erroneously cap the number of bytes to be sent to 0. Fix the send logic in AFCore to separate position in the source buffer and the ThreadLocal-provided direct ByteBuffer. --- .../src/main/java/org/newsclub/net/unix/AFCore.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java index ac00f8c8c..84b9ac3bb 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java @@ -176,16 +176,19 @@ int write(ByteBuffer src, SocketAddress target, int options) throws IOException } int pos = src.position(); - boolean isDirect = src.isDirect(); ByteBuffer buf; + int bufPos; if (isDirect) { buf = src; + bufPos = pos; } else { buf = getThreadLocalDirectByteBuffer(remaining); remaining = Math.min(remaining, buf.remaining()); - // Java 16: buf.put(buf.position(), src, src.position(), Math.min(buf.limit(), src.limit())); + bufPos = buf.position(); + + // Java 16: buf.put(bufPos, src, src.position(), Math.min(buf.limit(), src.limit())); int limit = src.limit(); if (limit > buf.limit()) { src.limit(buf.limit()); @@ -195,13 +198,13 @@ int write(ByteBuffer src, SocketAddress target, int options) throws IOException buf.put(src); } - buf.position(0); + buf.position(bufPos); } if (datagramMode) { options |= NativeUnixSocket.OPT_DGRAM_MODE; } - int written = NativeUnixSocket.send(fdesc, buf, pos, remaining, addressTo, addressToLen, + int written = NativeUnixSocket.send(fdesc, buf, bufPos, remaining, addressTo, addressToLen, options, ancillaryDataSupport); src.position(pos + written); From d1f2c7c073084f9331d4d8c414008b89abccf43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 20 Nov 2022 18:30:43 +0100 Subject: [PATCH 017/768] Update header files --- .../org/newsclub/net/unix/AFInputStream.java | 17 +++++++++++++++++ .../org/newsclub/net/unix/AFOutputStream.java | 17 +++++++++++++++++ .../org/newsclub/net/unix/CleanableState.java | 17 +++++++++++++++++ .../net/unix/DatagramSocketImplShim.java | 17 +++++++++++++++++ .../org/newsclub/net/unix/SocketImplShim.java | 17 +++++++++++++++++ .../org/newsclub/net/unix/FinalizeTest.java | 2 +- .../net/unix/StandardSocketOptionsTest.java | 17 +++++++++++++++++ .../net/unix/rmi/RemoteRegistryTest.java | 2 +- .../net/unix/selftest/SelftestProvider.java | 18 +++++++++++++++++- .../net/unix/tipc/SocketOptionsTest.java | 2 +- 10 files changed, 122 insertions(+), 4 deletions(-) diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java index bd11450b5..0cc123f10 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.io.IOException; diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java index d88fcb522..cd7e4e703 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.io.IOException; diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java index d78704771..c98a3ecc1 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.io.Closeable; diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java index 67bf87be6..b0353223a 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.net.DatagramSocketImpl; diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java index 84cd22f4c..ff6f22f1f 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.io.IOException; diff --git a/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java b/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java index c4dd0d538..3d67dc0ee 100644 --- a/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java +++ b/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2021 Christian Kohlschütter + * Copyright 2009-2022 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java b/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java index 1fe4af08c..5eba7394f 100644 --- a/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java +++ b/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.net.SocketAddress; diff --git a/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java b/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java index b99e8d00e..f01d1fb2d 100644 --- a/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java +++ b/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2021 Christian Kohlschütter + * Copyright 2009-2022 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java index e7dedf3f8..9ac849dda 100644 --- a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java +++ b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java @@ -1,6 +1,22 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix.selftest; -import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; diff --git a/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java b/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java index 765e9e025..6de9f6a77 100644 --- a/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java +++ b/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2021 Christian Kohlschütter + * Copyright 2009-2022 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 27d6570f08bd82ea904faa34aaf76044c36f8c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 20 Nov 2022 18:37:27 +0100 Subject: [PATCH 018/768] Align with latest kohlschutter-parent 1.5.2-SNAPSHOT --- junixsocket-selftest/pom.xml | 57 +++++++++++++++++++----------------- pom.xml | 1 + 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/junixsocket-selftest/pom.xml b/junixsocket-selftest/pom.xml index f213aa89c..34dddd3f4 100644 --- a/junixsocket-selftest/pom.xml +++ b/junixsocket-selftest/pom.xml @@ -91,27 +91,6 @@ org.apache.maven.plugins maven-resources-plugin - - copy-overlay-sources - generate-sources - - copy-resources - - - ${project.build.directory}/sources-java9 - true - - - ${project.basedir}/src/main/java-overlay - - ** - - - - true - - - copy-sources-from-junixsocket-java8 generate-sources @@ -122,71 +101,95 @@ ${project.build.directory}/sources-java8 true - - ${project.basedir}/src/main/java-overlay - - ** - - ${project.parent.basedir}/junixsocket-common/src/main/java ** + + module-info.java + ${project.parent.basedir}/junixsocket-common/src/main/java8 ** + + module-info.java + ${project.parent.basedir}/junixsocket-common/src/test/java ** + + module-info.java + ${project.parent.basedir}/junixsocket-common/src/test/java8 ** + + module-info.java + ${project.parent.basedir}/junixsocket-tipc/src/test/java ** + + module-info.java + ${project.parent.basedir}/junixsocket-tipc/src/test/java8 ** + + module-info.java + ${project.parent.basedir}/junixsocket-vsock/src/test/java ** + + module-info.java + ${project.parent.basedir}/junixsocket-vsock/src/test/java8 ** + + module-info.java + ${project.parent.basedir}/junixsocket-rmi/src/test/java ** + + module-info.java + ${project.parent.basedir}/junixsocket-rmi/src/test/java8 ** + + module-info.java + true diff --git a/pom.xml b/pom.xml index 0bb0903fc..c8e8a96a2 100644 --- a/pom.xml +++ b/pom.xml @@ -71,6 +71,7 @@ In contrast to other implementations, junixsocket extends the Java Sockets API ( ${m2e.version} 8 + 9 From bffe569ac3e321389ba2db68bf039862f28bd0ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Tue, 22 Nov 2022 19:40:26 +0100 Subject: [PATCH 019/768] Update code reformatting instructions "mvn process-sources -Preformat" does it all now. --- .../org/newsclub/net/unix/selftest/SelftestProvider.java | 2 +- pom.xml | 2 ++ src/site/markdown/eclipse.md | 2 +- src/site/markdown/release.md | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java index 9ac849dda..5aeedf52b 100644 --- a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java +++ b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java @@ -24,7 +24,7 @@ /** * Provides references to all tests that should be included in junixsocket-selftest. - * + * * @author Christian Kohlschütter */ public class SelftestProvider { diff --git a/pom.xml b/pom.xml index c8e8a96a2..2483bbeec 100644 --- a/pom.xml +++ b/pom.xml @@ -72,6 +72,8 @@ In contrast to other implementations, junixsocket extends the Java Sockets API ( 8 9 + + org/newsclub diff --git a/src/site/markdown/eclipse.md b/src/site/markdown/eclipse.md index d8be5be6e..b54e5626d 100644 --- a/src/site/markdown/eclipse.md +++ b/src/site/markdown/eclipse.md @@ -38,7 +38,7 @@ above the `junixsocket` parent project). You are encouraged to import the corresponding configuration files to your Eclipse workspace. If you don't want to apply these settings to your other projects, create a new Eclipse workspace -for junixsocket. You can also run `mvn formatter:format` to apply the formatting rules from the command line. +for junixsocket. You can also run `mvn process-sources -Preformat` to apply the formatting rules (along with other reformatting operations) from the command line. ## Code quality checks diff --git a/src/site/markdown/release.md b/src/site/markdown/release.md index 8bfabb7bc..29a82efcf 100644 --- a/src/site/markdown/release.md +++ b/src/site/markdown/release.md @@ -81,10 +81,10 @@ and add/commit both sets of changes. ### Ensure the code is properly formatted and licenses are in place +First, view the `LICENSE` file and verify that it's up to date. Then run the code formatters and commit. + cd junixsocket - # review LICENSE file and verify that it's up-to-date - mvn formatter:format - mvn license:format + mvn process-sources -Preformat # git add / commit here... ### Bump project version From 3f1457e6cb8157e95d7d767c9986f9d079181244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Dec 2022 17:28:38 +0100 Subject: [PATCH 020/768] Add missing native-graal configs When TIPC/VSOCK are enabled, additional classes are required. --- .../junixsocket-common/jni-config.json | 23 ++++++++++++++++++- .../junixsocket-tipc/jni-config.json | 17 ++++++++++++++ .../junixsocket-tipc/reflect-config.json | 6 +++++ .../junixsocket-vsock/jni-config.json | 17 ++++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json create mode 100644 junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json create mode 100644 junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/jni-config.json diff --git a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json index ca3ffe2b7..2fb48eda0 100644 --- a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json +++ b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json @@ -164,5 +164,26 @@ }, { "name":"org.newsclub.net.unix.vsock.AFVSOCKServerSocket" +}, +{ + "name":"java.net.SocketImpl" +}, +{ + "name":"java.net.DatagramSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.AFSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.SocketImplShim" +}, +{ + "name":"org.newsclub.net.unix.AFUNIXSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.AFUNIXDatagramSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.AFDatagramSocketImpl" } -] \ No newline at end of file +] diff --git a/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json new file mode 100644 index 000000000..73bdacb52 --- /dev/null +++ b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json @@ -0,0 +1,17 @@ +[ +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCDatagramSocket" +}, +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCDatagramSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCSocket" +}, +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCServerSocket" +} +] diff --git a/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json new file mode 100644 index 000000000..1c7d51400 --- /dev/null +++ b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json @@ -0,0 +1,6 @@ +[ +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCSocketOptions$MessageImportance", + "methods":[{"name":"ofValue","parameterTypes":["int"] }] +} +] diff --git a/junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/jni-config.json b/junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/jni-config.json new file mode 100644 index 000000000..fab1c7180 --- /dev/null +++ b/junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/jni-config.json @@ -0,0 +1,17 @@ +[ +{ + "name":"org.newsclub.net.unix.vsock.AFVSOCKDatagramSocket" +}, +{ + "name":"org.newsclub.net.unix.vsock.AFVSOCKDatagramSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.vsock.AFVSOCKSocket" +}, +{ + "name":"org.newsclub.net.unix.vsock.AFVSOCKSocketImpl" +}, +{ + "name":"org.newsclub.net.unix.vsock.AFVSOCKServerSocket" +} +] From 02554d456407315c9ff8eb6510a124a57554066e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Dec 2022 22:31:44 +0100 Subject: [PATCH 021/768] site: graalvm: Add known issues --- src/site/markdown/graalvm.md | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/site/markdown/graalvm.md b/src/site/markdown/graalvm.md index 6f80ffbd2..7f161dea2 100644 --- a/src/site/markdown/graalvm.md +++ b/src/site/markdown/graalvm.md @@ -59,6 +59,45 @@ The above binary, even though it currently cannot be built on Alpine Linux (musl adding `gcompat`: sudo apk add gcompat + +## Known issues + +### native-image needs a lot of RAM + +When you see an error message `Error: Image build request failed with exit status 137` coming from the Maven build of `junixsocket-selftest-native-image`, there was not enough RAM, and the kernel terminated the process. Either add some swap space or more RAM. + +### NoSuchMethodException: ...DatagramSocketImpl.peekData + +When you see errors like this, try building with a Java 19 GraalVM instead of Java 11 GraalVM: + +``` +Fatal error: org.graalvm.compiler.debug.GraalError: com.oracle.svm.util.ReflectionUtil$ReflectionUtilError: java.lang.NoSuchMethodException: org.newsclub.net.unix.vsock.AFVSOCKDatagramSocketImpl.peekData(java.net.DatagramPacket) + at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.setException(AnalysisFuture.java:49) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:269) + at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63) + at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisElement.lambda$execute$2(AnalysisElement.java:170) + at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193) + at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177) + at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426) + at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) + at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) + at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) + at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) + at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) +Caused by: com.oracle.svm.util.ReflectionUtil$ReflectionUtilError: java.lang.NoSuchMethodException: org.newsclub.net.unix.vsock.AFVSOCKDatagramSocketImpl.peekData(java.net.DatagramPacket) + at org.graalvm.nativeimage.base/com.oracle.svm.util.ReflectionUtil.lookupMethod(ReflectionUtil.java:82) + at org.graalvm.nativeimage.base/com.oracle.svm.util.ReflectionUtil.lookupMethod(ReflectionUtil.java:69) + at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.JNIRegistrationUtil.method(JNIRegistrationUtil.java:91) + at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.jdk.JNIRegistrationJavaNet.lambda$registerDatagramSocketCheckOldImpl$0(JNIRegistrationJavaNet.java:230) + at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisElement$SubtypeReachableNotification.lambda$notifyCallback$0(AnalysisElement.java:129) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + ... 10 more +Caused by: java.lang.NoSuchMethodException: org.newsclub.net.unix.vsock.AFVSOCKDatagramSocketImpl.peekData(java.net.DatagramPacket) + at java.base/java.lang.Class.getDeclaredMethod(Class.java:2475) + at org.graalvm.nativeimage.base/com.oracle.svm.util.ReflectionUtil.lookupMethod(ReflectionUtil.java:74) + ... 15 more +``` + ## Building and Maintaining junixsocket's Reachability Metadata From 61a899c2cd43451ef5613ad809c7f84ec8a03f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 5 Dec 2022 01:07:15 +0100 Subject: [PATCH 022/768] Work around an issue with GraalVM and TIPC --- .../newsclub/net/unix/AFDatagramSocket.java | 30 ++++++++++- .../newsclub/net/unix/DatagramSocketShim.java | 52 +++++++++++++++++++ .../newsclub/net/unix/DatagramSocketShim.java | 33 ++++++++++++ .../net/unix/tipc/SocketOptionsTest.java | 9 ++-- 4 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java create mode 100644 junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java index d06b7cfdd..3f8b3fb25 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java @@ -40,7 +40,7 @@ * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ -public abstract class AFDatagramSocket extends DatagramSocket implements +public abstract class AFDatagramSocket extends DatagramSocketShim implements AFSomeSocket, AFSocketExtensions { private static final InetSocketAddress WILDCARD_ADDRESS = new InetSocketAddress(0); @@ -424,4 +424,32 @@ protected final AFAddressFamily addressFamily() { protected AFSocketImplExtensions getImplExtensions() { return getAFImpl(false).getImplExtensions(); } + + /** + * Returns the value of a junixsocket socket option. + * + * @param The type of the socket option value. + * @param name The socket option. + * @return The value of the socket option. + * @throws IOException on error. + */ + @Override + public T getOption(AFSocketOption name) throws IOException { + return getAFImpl().getCore().getOption(name); + } + + /** + * Sets the value of a socket option. + * + * @param The type of the socket option value. + * @param name The socket option. + * @param value The value of the socket option. + * @return this DatagramSocket. + * @throws IOException on error. + */ + @Override + public DatagramSocket setOption(AFSocketOption name, T value) throws IOException { + getAFImpl().getCore().setOption(name, value); + return this; + } } diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java new file mode 100644 index 000000000..2acc227e2 --- /dev/null +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java @@ -0,0 +1,52 @@ +package org.newsclub.net.unix; + +import java.io.IOException; +import java.net.DatagramSocket; +import java.net.DatagramSocketImpl; +import java.net.SocketOption; + +abstract class DatagramSocketShim extends DatagramSocket { + + protected DatagramSocketShim(DatagramSocketImpl impl) { + super(impl); + } + + @Override + public T getOption(SocketOption name) throws IOException { + if (name instanceof AFSocketOption) { + return getOption((AFSocketOption) name); + } else { + return super.getOption(name); + } + } + + @Override + public DatagramSocket setOption(SocketOption name, T value) throws IOException { + if (name instanceof AFSocketOption) { + return setOption((AFSocketOption) name, value); + } else { + return super.setOption(name, value); + } + } + + /** + * Returns the value of a junixsocket socket option. + * + * @param The type of the socket option value. + * @param name The socket option. + * @return The value of the socket option. + * @throws IOException on error. + */ + public abstract T getOption(AFSocketOption name) throws IOException; + + /** + * Sets the value of a socket option. + * + * @param The type of the socket option value. + * @param name The socket option. + * @param value The value of the socket option. + * @return this DatagramSocket. + * @throws IOException on error. + */ + public abstract DatagramSocket setOption(AFSocketOption name, T value) throws IOException; +} diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java new file mode 100644 index 000000000..c7f036c64 --- /dev/null +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java @@ -0,0 +1,33 @@ +package org.newsclub.net.unix; + +import java.io.IOException; +import java.net.DatagramSocket; +import java.net.DatagramSocketImpl; + +abstract class DatagramSocketShim extends DatagramSocket { + + protected DatagramSocketShim(DatagramSocketImpl impl) { + super(impl); + } + + /** + * Returns the value of a junixsocket socket option. + * + * @param The type of the socket option value. + * @param name The socket option. + * @return The value of the socket option. + * @throws IOException on error. + */ + public abstract T getOption(AFSocketOption name) throws IOException; + + /** + * Sets the value of a socket option. + * + * @param The type of the socket option value. + * @param name The socket option. + * @param value The value of the socket option. + * @return this DatagramSocket. + * @throws IOException on error. + */ + public abstract DatagramSocket setOption(AFSocketOption name, T value) throws IOException; +} diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java index 40660f281..0e5a15134 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java @@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue; import java.io.IOException; -import java.net.DatagramSocket; import java.net.NoRouteToHostException; import java.net.Socket; import java.net.SocketException; @@ -87,9 +86,9 @@ public void testTIPCImportance() throws Exception { @Test public void testTIPCSourceDroppable() throws Exception { - DatagramSocket socket = newDatagramSocket(); + // NOTE: casting to work around GraalVM issue + AFTIPCDatagramSocket socket = (AFTIPCDatagramSocket) newDatagramSocket(); - @SuppressWarnings("null") boolean droppable = socket.getOption(AFTIPCSocketOptions.TIPC_SRC_DROPPABLE); assertTrue(droppable, "Datagram messages should be droppable by default"); @@ -99,9 +98,9 @@ public void testTIPCSourceDroppable() throws Exception { @Test public void testTIPCDestDroppable() throws Exception { - DatagramSocket socket = newDatagramSocket(); + // NOTE: casting to work around GraalVM issue + AFTIPCDatagramSocket socket = (AFTIPCDatagramSocket) newDatagramSocket(); - @SuppressWarnings("null") boolean droppable = socket.getOption(AFTIPCSocketOptions.TIPC_DEST_DROPPABLE); assertTrue(droppable, "Datagram messages should be droppable by default"); From 8aeb8dcbc413b062fb9511f30bebef8ce155ba17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 5 Dec 2022 01:31:39 +0100 Subject: [PATCH 023/768] demo: Bump postgresql dependency --- junixsocket-demo/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/junixsocket-demo/pom.xml b/junixsocket-demo/pom.xml index 7c802337f..48ec36e4e 100644 --- a/junixsocket-demo/pom.xml +++ b/junixsocket-demo/pom.xml @@ -71,7 +71,7 @@ org.postgresql postgresql - 42.5.0 + 42.5.1 provided From 8ce390beb8e6020d8cd654cb2f2073e528013782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 5 Dec 2022 01:34:10 +0100 Subject: [PATCH 024/768] Address PMD warning --- .../src/main/java/org/newsclub/net/unix/DatagramSocketShim.java | 1 + .../src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java | 1 + 2 files changed, 2 insertions(+) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java index 2acc227e2..bb4fea972 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java @@ -48,5 +48,6 @@ public DatagramSocket setOption(SocketOption name, T value) throws IOExce * @return this DatagramSocket. * @throws IOException on error. */ + @SuppressWarnings("PMD.LinguisticNaming") public abstract DatagramSocket setOption(AFSocketOption name, T value) throws IOException; } diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java index c7f036c64..57abdf447 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java @@ -29,5 +29,6 @@ protected DatagramSocketShim(DatagramSocketImpl impl) { * @return this DatagramSocket. * @throws IOException on error. */ + @SuppressWarnings("PMD.LinguisticNaming") public abstract DatagramSocket setOption(AFSocketOption name, T value) throws IOException; } From 0a32485b046d68f60db8f61834a6a4fb70bc4a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 5 Dec 2022 01:36:05 +0100 Subject: [PATCH 025/768] Reformat --- .../org/newsclub/net/unix/AFDatagramSocket.java | 4 ++-- .../newsclub/net/unix/DatagramSocketShim.java | 17 +++++++++++++++++ .../newsclub/net/unix/DatagramSocketShim.java | 17 +++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java index 3f8b3fb25..d2ad3ab23 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java @@ -40,8 +40,8 @@ * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ -public abstract class AFDatagramSocket extends DatagramSocketShim implements - AFSomeSocket, AFSocketExtensions { +public abstract class AFDatagramSocket extends DatagramSocketShim + implements AFSomeSocket, AFSocketExtensions { private static final InetSocketAddress WILDCARD_ADDRESS = new InetSocketAddress(0); private final AFDatagramSocketImpl impl; diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java index bb4fea972..5c860815d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.io.IOException; diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java index 57abdf447..e25c52f08 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java @@ -1,3 +1,20 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.newsclub.net.unix; import java.io.IOException; From ffe38866aff2ebb8225da55a5d608bc27cccfb8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 29 Dec 2022 20:29:16 +0100 Subject: [PATCH 026/768] Improve error messaging on systems where the native library is unsupported. --- .../newsclub/net/unix/AFSocketAddress.java | 22 +++++++++++++------ .../org/newsclub/net/unix/AFSocketImpl.java | 2 +- .../newsclub/net/unix/NativeUnixSocket.java | 2 +- .../net/unix/AFTIPCSocketAddressTest.java | 21 ++++++++++++------ 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index f95bc2ada..759693edb 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -501,10 +501,16 @@ static final int unwrapAddressDirectBufferInternal(ByteBuffer socketAddressBuffe * * @return The direct {@link ByteBuffer}. */ - final ByteBuffer getNativeAddressDirectBuffer() { - ByteBuffer direct = getNativeAddressDirectBuffer(nativeAddress.limit()); - nativeAddress.position(0); - direct.put(nativeAddress); + final ByteBuffer getNativeAddressDirectBuffer() throws SocketException { + ByteBuffer address = nativeAddress; + if (address == null) { + throw (SocketException) new SocketException("Cannot access native address").initCause( + NativeUnixSocket.unsupportedException()); + } + + ByteBuffer direct = getNativeAddressDirectBuffer(address.limit()); + address.position(0); + direct.put(address); return direct; } @@ -537,7 +543,8 @@ protected static final boolean isSupportedAddress(InetAddress addr, AFAddressFam */ public final void writeNativeAddressTo(ByteBuffer buf) throws IOException { if (nativeAddress == null) { - throw new IOException("Cannot access native address"); + throw (SocketException) new SocketException("Cannot access native address").initCause( + NativeUnixSocket.unsupportedException()); } buf.put(nativeAddress); } @@ -640,7 +647,7 @@ public URI toURI(String scheme, URI template) throws IOException { * * @param socketType The socket type, or {@code null} to omit from string. * @param socketProtocol The socket protocol, or {@code null} to omit from string. - * @return The string (such as 1:0:x2f746d702f796f), or {@code null} if unable to retrieve. + * @return The string (such as 1:0:x2f746d702f796f). * @throws IOException on error. */ public @Nullable @SuppressWarnings("PMD.NPathComplexity") String toSocatAddressString( @@ -650,7 +657,8 @@ public URI toURI(String scheme, URI template) throws IOException { return null; } if (nativeAddress == null) { - return null; + throw (SocketException) new SocketException("Cannot access native address").initCause( + NativeUnixSocket.unsupportedException()); } if (socketProtocol != null && socketProtocol.getId() != 0) { throw new IOException("Protocol not (yet) supported"); // FIXME diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java index 6469dc1a1..b284a6e65 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java @@ -133,7 +133,7 @@ protected void unblockAccepts() { } catch (Exception e) { // ignore } - } catch (Exception e) { + } catch (RuntimeException e) { // ignore } diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java index 35372d43f..facf61fda 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java @@ -106,7 +106,7 @@ static void ensureSupported() throws UnsupportedOperationException { static UnsupportedOperationException unsupportedException() { if (!isLoaded()) { return (UnsupportedOperationException) new UnsupportedOperationException( - "junixsocket is not supported on this platform").initCause(initError); + "junixsocket may not be fully supported on this platform").initCause(initError); } else { return null; } diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java index ec22687b4..b497db5c7 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java @@ -18,7 +18,7 @@ package org.newsclub.net.unix; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -125,12 +125,19 @@ public void testGeneric() throws Exception { @Test public void testSocatString() throws Exception { - String socatString = AFTIPCSocketAddress.ofService(123, 456).toSocatAddressString( - AFSocketType.SOCK_STREAM, AFSocketProtocol.DEFAULT); - if (socatString == null) { - assertFalse(AFSocket.supports(AFSocketCapability.CAPABILITY_TIPC)); - } else { - assertTrue(socatString.contains(":")); + String socatString; + try { + socatString = AFTIPCSocketAddress.ofService(123, 456).toSocatAddressString( + AFSocketType.SOCK_STREAM, AFSocketProtocol.DEFAULT); + assertNotNull(socatString); + } catch (SocketException e) { + if (AFSocket.supports(AFSocketCapability.CAPABILITY_TIPC)) { + throw e; + } else { + // expected + return; + } } + assertTrue(socatString.contains(":")); } } From 5f6f72282f89ccf28daf25c3e00e1b95451af553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 8 Jan 2023 19:07:03 +0100 Subject: [PATCH 027/768] Reformat, fix new Javadoc warnings --- .../main/java/org/newsclub/net/unix/AFDatagramChannel.java | 1 + .../org/newsclub/net/unix/AFSocketAddressFromHostname.java | 1 + .../main/java/org/newsclub/net/unix/AFSocketFactory.java | 1 + .../src/main/java/org/newsclub/net/unix/AFSocketImpl.java | 1 + .../org/newsclub/lib/junixsocket/custom/NarMetadata.java | 2 +- .../org/newsclub/lib/junixsocket/custom/package-info.java | 6 +++--- .../net/unix/rmi/DefaultRMIClientSocketFactory.java | 4 +--- .../net/unix/rmi/DefaultRMIServerSocketFactory.java | 4 +--- .../java/org/newsclub/net/unix/rmi/RemoteCloseable.java | 1 + .../org/newsclub/net/unix/rmi/RemoteCloseableImpl.java | 1 + .../newsclub/net/unix/rmi/RemoteFileDescriptorBase.java | 7 +++---- .../java/org/newsclub/net/unix/server/AFSocketServer.java | 1 + .../java/org/newsclub/net/unix/server/SocketServer.java | 3 +++ 13 files changed, 19 insertions(+), 14 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java index cf65b3155..fec4b01c6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java @@ -39,6 +39,7 @@ * A {@link DatagramChannel} implementation that works with junixsocket. * * @author Christian Kohlschütter + * @param The supported address type. */ public abstract class AFDatagramChannel extends DatagramChannel implements AFSomeSocket, AFSocketExtensions { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java index 7fa905d2d..7f6c4643d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java @@ -24,6 +24,7 @@ * Helps converting an internet "hostname" to an {@link AFSocketAddress}. * * @author Christian Kohlschütter + * @param The supported address type. */ public interface AFSocketAddressFromHostname { /** diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java index 0ca0ccea7..20a9c128d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java @@ -33,6 +33,7 @@ * mapping is left to the implementor. * * @see AFUNIXSocketFactory + * @param The supported address type. */ public abstract class AFSocketFactory extends SocketFactory implements AFSocketAddressFromHostname { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java index b284a6e65..4341db5bc 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java @@ -42,6 +42,7 @@ * junixsocket-based {@link SocketImpl}. * * @author Christian Kohlschütter + * @param The supported address type. */ @SuppressWarnings({"PMD.CyclomaticComplexity"}) public abstract class AFSocketImpl extends SocketImplShim { diff --git a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java index 4613c7e5a..bd66e21b1 100644 --- a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java +++ b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java @@ -21,7 +21,7 @@ /** * Marker class to find native libraries in the classpath. - * + * * @author Christian Kohlschütter */ public final class NarMetadata { diff --git a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java index 068069722..6d0528155 100644 --- a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java +++ b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java @@ -1,11 +1,11 @@ /** * Helper package to identify the Maven artifact with JNI libraries for specific architectures. - * + * * There are multiple artifacts with the same identifier (junixsocket-native), one per architecture. - * + * * If you want to run junixsocket on your architecture, you need to make sure that the correct one * is in the classpath. - * + * * See "junixsocket-native-common" for an artifact containing the commonly used architectures. */ package org.newsclub.lib.junixsocket.custom; diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java index c85243fe3..30377e75b 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java @@ -22,12 +22,10 @@ import java.net.Socket; import java.rmi.server.RMIClientSocketFactory; -import org.newsclub.net.unix.AFSocket; - /** * An implementation of {@link RMIClientSocketFactory}. * - * @see AFRMISocketFactory where we deal with {@link AFSocket}s. + * @see AFRMISocketFactory */ public final class DefaultRMIClientSocketFactory implements RMIClientSocketFactory, Serializable { private static final long serialVersionUID = 1L; diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java index dadcd675e..db18690e6 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java @@ -22,12 +22,10 @@ import java.net.ServerSocket; import java.rmi.server.RMIServerSocketFactory; -import org.newsclub.net.unix.AFSocket; - /** * An implementation of {@link RMIServerSocketFactory}. * - * @see AFRMISocketFactory where we deal with {@link AFSocket}. + * @see AFRMISocketFactory */ public class DefaultRMIServerSocketFactory implements RMIServerSocketFactory, Serializable { private static final long serialVersionUID = 1L; diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java index 2c09add67..960ab1b6f 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java @@ -26,6 +26,7 @@ * A resource that can be exposed remotely, and closed locally as well as remotely. * * @author Christian Kohlschütter + * @param The resource type. */ public interface RemoteCloseable extends Remote, Closeable { /** diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java index 3175121de..5ffac4472 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java @@ -27,6 +27,7 @@ * * @author Christian Kohlschütter * @see RemoteCloseable + * @param The resource type. */ public class RemoteCloseableImpl implements RemoteCloseable { private final T remote; diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java index 642d7b052..32827f6f2 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java @@ -22,8 +22,6 @@ import java.io.DataOutputStream; import java.io.Externalizable; import java.io.FileDescriptor; -import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInput; @@ -48,8 +46,9 @@ * A wrapper that allows a {@link FileDescriptor} be sent via RMI over AF_UNIX sockets. * * @author Christian Kohlschütter - * @see RemoteFileInput subclass for sending {@link FileInputStream}s. - * @see RemoteFileOutput subclass for sending {@link FileOutputStream}s. + * @param The resource type. + * @see RemoteFileInput + * @see RemoteFileOutput */ public abstract class RemoteFileDescriptorBase implements Externalizable, Closeable, FileDescriptorAccess { diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java index 5d704d981..403445335 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java @@ -29,6 +29,7 @@ * A base implementation for a simple, multi-threaded socket server using {@link AFSocket}s. * * @author Christian Kohlschütter + * @param The supported address type. */ public abstract class AFSocketServer extends SocketServer, AFServerSocket> { diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java index a1977d25f..4479af73a 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java @@ -46,6 +46,9 @@ * * @author Christian Kohlschütter * @see AFSocketServer + * @param The supported address type. + * @param The supported {@link Socket} type. + * @param The supported {@link ServerSocket} type. */ public abstract class SocketServer { private static final ScheduledExecutorService TIMEOUTS = Executors.newScheduledThreadPool(1); From b44e891e1fe3225982fdc19182981efb693da274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 8 Jan 2023 19:07:34 +0100 Subject: [PATCH 028/768] GraalVM Native Image support: Improve optional class references Conditionally reference TIPC/VSOCK code to prevent warnings upon native-image compilation. --- .../junixsocket-common/jni-config.json | 6 ++++++ .../junixsocket-common/reflect-config.json | 7 ++++--- .../junixsocket-common/resource-config.json | 2 ++ .../junixsocket-native-common/reflect-config.json | 5 +++++ .../junixsocket-native-common/resource-config.json | 9 +++++++++ .../junixsocket-native-custom/reflect-config.json | 5 +++++ .../junixsocket-native-custom/resource-config.json | 9 +++++++++ .../junixsocket-tipc/jni-config.json | 10 ++++++++++ .../junixsocket-tipc/reflect-config.json | 5 ++++- .../junixsocket-vsock/reflect-config.json | 5 +++++ 10 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/reflect-config.json create mode 100644 junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/resource-config.json create mode 100644 junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/reflect-config.json create mode 100644 junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/resource-config.json create mode 100644 junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/reflect-config.json diff --git a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json index 2fb48eda0..11091a68d 100644 --- a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json +++ b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/jni-config.json @@ -141,9 +141,11 @@ "methods":[{"name":"","parameterTypes":["java.lang.String"] }] }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFTIPCDatagramSocket" }, "name":"org.newsclub.net.unix.tipc.AFTIPCDatagramSocket" }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFTIPCGroupRequest" }, "name":"org.newsclub.net.unix.tipc.AFTIPCGroupRequest", "methods":[ {"name":"fromNative","parameterTypes":["int","int","int","int"] }, @@ -154,15 +156,19 @@ ] }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFTIPCSocket" }, "name":"org.newsclub.net.unix.tipc.AFTIPCSocket" }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFVSOCKDatagramSocket" }, "name":"org.newsclub.net.unix.vsock.AFVSOCKDatagramSocket" }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFVSOCKSocket" }, "name":"org.newsclub.net.unix.vsock.AFVSOCKSocket" }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFVSOCKServerSocket" }, "name":"org.newsclub.net.unix.vsock.AFVSOCKServerSocket" }, { diff --git a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json index 7c4e0ed58..bd8822627 100644 --- a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json +++ b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json @@ -3,14 +3,13 @@ "name":"java.nio.channels.spi.AbstractSelectableChannel" }, { + "condition" : { "typeReachable" : "org.newsclub.lib.junixsocket.common.NarMetadata" }, "name":"org.newsclub.lib.junixsocket.common.NarMetadata" }, { + "condition" : { "typeReachable" : "org.newsclub.lib.junixsocket.custom.NarMetadata" }, "name":"org.newsclub.lib.junixsocket.custom.NarMetadata" }, -{ - "name":"org.newsclub.net.unix.AFSocketCapabilityRequirement" -}, { "name":"org.newsclub.net.unix.AFTIPCSocketAddress", "methods":[{"name":"addressFamily","parameterTypes":[] }] @@ -24,9 +23,11 @@ "methods":[{"name":"addressFamily","parameterTypes":[] }] }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFTIPCSelectorProvider" }, "name":"org.newsclub.net.unix.tipc.AFTIPCSelectorProvider" }, { + "condition" : { "typeReachable" : "org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider" }, "name":"org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider" } ] diff --git a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/resource-config.json b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/resource-config.json index d75817c78..081835ed6 100644 --- a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/resource-config.json +++ b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/resource-config.json @@ -5,9 +5,11 @@ "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-common/pom.properties\\E" }, { + "condition" : { "typeReachable" : "org.newsclub.lib.junixsocket.common.NarMetadata" }, "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-common/pom.properties\\E" }, { + "condition" : { "typeReachable" : "org.newsclub.lib.junixsocket.custom.NarMetadata" }, "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-custom/pom.properties\\E" } ]}, diff --git a/junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/reflect-config.json b/junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/reflect-config.json new file mode 100644 index 000000000..e760d590e --- /dev/null +++ b/junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/reflect-config.json @@ -0,0 +1,5 @@ +[ +{ + "name":"org.newsclub.lib.junixsocket.common.NarMetadata" +} +] diff --git a/junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/resource-config.json b/junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/resource-config.json new file mode 100644 index 000000000..54ecda6a7 --- /dev/null +++ b/junixsocket-native-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-common/resource-config.json @@ -0,0 +1,9 @@ +{ + "resources":{ + "includes":[ + { + "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-common/pom.properties\\E" + } + ]}, + "bundles":[] +} \ No newline at end of file diff --git a/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/reflect-config.json b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/reflect-config.json new file mode 100644 index 000000000..3ca368701 --- /dev/null +++ b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/reflect-config.json @@ -0,0 +1,5 @@ +[ +{ + "name":"org.newsclub.lib.junixsocket.custom.NarMetadata" +} +] diff --git a/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/resource-config.json b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/resource-config.json new file mode 100644 index 000000000..6ea5af423 --- /dev/null +++ b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/resource-config.json @@ -0,0 +1,9 @@ +{ + "resources":{ + "includes":[ + { + "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-custom/pom.properties\\E" + } + ]}, + "bundles":[] +} \ No newline at end of file diff --git a/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json index 73bdacb52..aa964b98c 100644 --- a/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json +++ b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/jni-config.json @@ -13,5 +13,15 @@ }, { "name":"org.newsclub.net.unix.tipc.AFTIPCServerSocket" +}, +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCGroupRequest", + "methods":[ + {"name":"fromNative","parameterTypes":["int","int","int","int"] }, + {"name":"getFlagsValue","parameterTypes":[] }, + {"name":"getInstance","parameterTypes":[] }, + {"name":"getScopeId","parameterTypes":[] }, + {"name":"getType","parameterTypes":[] } + ] } ] diff --git a/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json index 1c7d51400..3752b009c 100644 --- a/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json +++ b/junixsocket-tipc/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-tipc/reflect-config.json @@ -1,6 +1,9 @@ [ +{ + "name":"org.newsclub.net.unix.tipc.AFTIPCSelectorProvider" +}, { "name":"org.newsclub.net.unix.tipc.AFTIPCSocketOptions$MessageImportance", "methods":[{"name":"ofValue","parameterTypes":["int"] }] } -] +] \ No newline at end of file diff --git a/junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/reflect-config.json b/junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/reflect-config.json new file mode 100644 index 000000000..a18eb4210 --- /dev/null +++ b/junixsocket-vsock/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-vsock/reflect-config.json @@ -0,0 +1,5 @@ +[ +{ + "name":"org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider" +} +] \ No newline at end of file From 5a10f38fb686a118dab71cbc2fa3904ed039c2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Mon, 9 Jan 2023 01:18:19 +0100 Subject: [PATCH 029/768] GraalVM Native Image support: More changes --- .../junixsocket-common/reflect-config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json index bd8822627..38c64109d 100644 --- a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json +++ b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/reflect-config.json @@ -22,12 +22,18 @@ "name":"org.newsclub.net.unix.AFVSOCKSocketAddress", "methods":[{"name":"addressFamily","parameterTypes":[] }] }, +{ + "name":"org.newsclub.net.unix.AFUNIXSelectorProvider", + "allPublicMethods":true +}, { "condition" : { "typeReachable" : "org.newsclub.net.unix.tipc.AFTIPCSelectorProvider" }, - "name":"org.newsclub.net.unix.tipc.AFTIPCSelectorProvider" + "name":"org.newsclub.net.unix.tipc.AFTIPCSelectorProvider", + "allPublicMethods":true }, { "condition" : { "typeReachable" : "org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider" }, - "name":"org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider" + "name":"org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider", + "allPublicMethods":true } ] From 96c9f4fd0e0b2eeef6ba95413608d0e514760384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 27 Jan 2023 19:19:48 +0100 Subject: [PATCH 030/768] Fix AFVSOCKSocketAddress.toSocatAddressString test AFSocketAddress.toSocatAddressString may throw a SocketException if the address is not natively supported on the target system. The unit test didn't catch that. --- .../net/unix/AFVSOCKSocketAddressTest.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java index 8a13033dd..f18103ece 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java @@ -18,7 +18,7 @@ package org.newsclub.net.unix; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -96,12 +96,19 @@ public void testNamedCIDs() throws Exception { @Test public void testSocatString() throws Exception { - String socatString = AFVSOCKSocketAddress.ofPortAndCID(123, 4).toSocatAddressString( - AFSocketType.SOCK_STREAM, AFSocketProtocol.DEFAULT); - if (socatString == null) { - assertFalse(AFSocket.supports(AFSocketCapability.CAPABILITY_VSOCK)); - } else { - assertTrue(socatString.contains(":")); + String socatString; + try { + socatString = AFVSOCKSocketAddress.ofPortAndCID(123, 4).toSocatAddressString( + AFSocketType.SOCK_STREAM, AFSocketProtocol.DEFAULT); + assertNotNull(socatString); + } catch (SocketException e) { + if (AFSocket.supports(AFSocketCapability.CAPABILITY_VSOCK)) { + throw e; + } else { + // expected + return; + } } + assertTrue(socatString.contains(":")); } } From a45bb34a05743c01a3265ac8e845044f3331fbab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 27 Jan 2023 19:21:27 +0100 Subject: [PATCH 031/768] Fix AFSocketAddress serialization Since AFSocketAddress extends SocketAddress, it must support serialization. Unfortunately, there were two members that aren't serializable. Fix serialization to keep everyone happy. --- .../newsclub/net/unix/AFSocketAddress.java | 36 ++++++++++++++++--- .../net/unix/AFUNIXSocketAddressTest.java | 22 ++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index 759693edb..dc6643af4 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -21,6 +21,8 @@ import java.io.FileDescriptor; import java.io.FileNotFoundException; import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.InetSocketAddress; @@ -87,12 +89,13 @@ protected ByteBuffer initialValue() { /** * The system-native representation of this address, or {@code null}. */ - private final ByteBuffer nativeAddress; + @SuppressWarnings("PMD.ImmutableField") + private transient ByteBuffer nativeAddress; /** * The address family. */ - private final AFAddressFamily addressFamily; + private transient AFAddressFamily addressFamily; /** * Creates a new socket address. @@ -643,12 +646,13 @@ public URI toURI(String scheme, URI template) throws IOException { * address type is not natively supported by this platform. * * This call is mostly suited for debugging purposes. The resulting string is specific to the - * platform the code is executed on, and thus may be different among platforms (or {@code null}). + * platform the code is executed on, and thus may be different among platforms. * * @param socketType The socket type, or {@code null} to omit from string. * @param socketProtocol The socket protocol, or {@code null} to omit from string. * @return The string (such as 1:0:x2f746d702f796f). - * @throws IOException on error. + * @throws IOException on error (a {@link SocketException} is thrown if the native address cannot + * be accessed). */ public @Nullable @SuppressWarnings("PMD.NPathComplexity") String toSocatAddressString( AFSocketType socketType, AFSocketProtocol socketProtocol) throws IOException { @@ -703,4 +707,28 @@ public URI toURI(String scheme, URI template) throws IOException { public boolean covers(AFSocketAddress other) { return this.equals(other); } + + /** + * Custom serialization: Reference {@link AFAddressFamily} instance by identifier string. + * + * @param in The {@link ObjectInputStream}. + * @throws ClassNotFoundException on error. + * @throws IOException on error. + */ + private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { + in.defaultReadObject(); + this.addressFamily = Objects.requireNonNull(AFAddressFamily.getAddressFamily(in.readUTF()), + "address family"); + } + + /** + * Custom serialization: Reference {@link AFAddressFamily} instance by identifier string. + * + * @param out The {@link ObjectOutputStream}. + * @throws IOException on error. + */ + private void writeObject(ObjectOutputStream out) throws IOException { + out.defaultWriteObject(); + out.writeUTF(addressFamily.getJuxString()); + } } diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java index 828125a7f..10da05844 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java @@ -22,7 +22,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.net.URI; import java.util.Arrays; @@ -133,4 +137,22 @@ public void testAbstractNamespace() throws Exception { assertNotNull(AFUNIXSocketAddress.inAbstractNamespace("test")); assertNotNull(AFUNIXSocketAddress.inAbstractNamespace("test", 1234)); } + + @Test + public void testSerialize() throws Exception { + try (ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos)) { + + AFUNIXSocketAddress addr = AFUNIXSocketAddress.of(URI.create("file:/tmp/yo")); + oos.writeObject(addr); + oos.flush(); + + try (ObjectInputStream oin = new ObjectInputStream(new ByteArrayInputStream(bos + .toByteArray()))) { + AFUNIXSocketAddress addr2 = (AFUNIXSocketAddress) oin.readObject(); + assertEquals(addr, addr2); + assertEquals(addr.getAddressFamily(), addr2.getAddressFamily()); + } + } + } } From aea17236140a046393f4343f52f9f7229bb21a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 5 Feb 2023 23:55:32 +0100 Subject: [PATCH 032/768] jetty: Remove reference to ArrayByteBufferPool --- .../org/newsclub/net/unix/jetty/AFSocketServerConnector.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java index 68098af07..402ac663b 100644 --- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java +++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java @@ -53,7 +53,6 @@ import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicReference; -import org.eclipse.jetty.io.ArrayByteBufferPool; import org.eclipse.jetty.io.ByteBufferPool; import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.EndPoint; @@ -136,7 +135,7 @@ public AFSocketServerConnector(Server server, int acceptors, int selectors, * @param scheduler A scheduler for this connector or null to either a {@link Scheduler} set as a * server bean or if none set, then a new {@link ScheduledExecutorScheduler} instance. * @param pool A buffer pool for this connector or null to either a {@link ByteBufferPool} set as - * a server bean or none set, the new {@link ArrayByteBufferPool} instance. + * a server bean or none set, the new {code ArrayByteBufferPool} instance. * @param acceptors the number of acceptor threads to use, or -1 for a default value. If 0, then * no acceptor threads will be launched and some other mechanism will need to be used to * accept new connections. From c3af8fe20f2c6488575cc41b1b129f4bb85e3bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Wed, 8 Feb 2023 19:06:23 +0100 Subject: [PATCH 033/768] Update dependencies --- junixsocket-demo/pom.xml | 24 ++++------------------- junixsocket-jetty/pom.xml | 4 ++-- junixsocket-mysql/pom.xml | 2 +- junixsocket-selftest-native-image/pom.xml | 2 +- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/junixsocket-demo/pom.xml b/junixsocket-demo/pom.xml index 48ec36e4e..b7082b751 100644 --- a/junixsocket-demo/pom.xml +++ b/junixsocket-demo/pom.xml @@ -14,9 +14,7 @@ ${project.parent.basedir} 8 - Some example code to demo junixsocket's features - @@ -47,22 +45,9 @@ ${project.version} - mysql - mysql-connector-java - 8.0.30 - - - com.google.protobuf - protobuf-java - - - - - - - com.google.protobuf - protobuf-java - 3.19.6 + com.mysql + mysql-connector-j + 8.0.32 org.postgresql postgresql - 42.5.1 + 42.5.3 provided @@ -93,7 +78,6 @@ 4.10.0 - diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml index cacdf253f..cc4033898 100644 --- a/junixsocket-jetty/pom.xml +++ b/junixsocket-jetty/pom.xml @@ -12,7 +12,7 @@ junixsocket-jetty ${project.parent.basedir} - 11.0.12 + 11.0.13 junixsocket for Jetty @@ -34,7 +34,7 @@ org.slf4j slf4j-simple - 2.0.3 + 2.0.6 test diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index d98ebfe2c..547134e0e 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -26,7 +26,7 @@ com.mysql mysql-connector-j - 8.0.31 + 8.0.32 provided diff --git a/junixsocket-selftest-native-image/pom.xml b/junixsocket-selftest-native-image/pom.xml index e2763e1fd..05c0ce279 100644 --- a/junixsocket-selftest-native-image/pom.xml +++ b/junixsocket-selftest-native-image/pom.xml @@ -51,7 +51,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.17 + 0.9.19 From 2e404585841ca1c703fc4306b465a8413634d348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Wed, 8 Feb 2023 19:13:03 +0100 Subject: [PATCH 034/768] Reformat code --- .../src/main/java/org/newsclub/net/unix/AFSocketAddress.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index dc6643af4..eea3cdb5d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -710,7 +710,7 @@ public boolean covers(AFSocketAddress other) { /** * Custom serialization: Reference {@link AFAddressFamily} instance by identifier string. - * + * * @param in The {@link ObjectInputStream}. * @throws ClassNotFoundException on error. * @throws IOException on error. @@ -723,7 +723,7 @@ private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOE /** * Custom serialization: Reference {@link AFAddressFamily} instance by identifier string. - * + * * @param out The {@link ObjectOutputStream}. * @throws IOException on error. */ From 033327e15229fadb592e9d59111b7f59745fcab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Wed, 8 Feb 2023 19:33:52 +0100 Subject: [PATCH 035/768] Update junixsocket version to 2.6.2, update changelog --- README.md | 2 +- junixsocket-codecoverage/pom.xml | 2 +- junixsocket-common/pom.xml | 2 +- junixsocket-core/pom.xml | 2 +- junixsocket-demo/pom.xml | 2 +- junixsocket-dist/pom.xml | 2 +- junixsocket-jetty/pom.xml | 2 +- junixsocket-mysql/pom.xml | 2 +- junixsocket-native-common/pom.xml | 2 +- junixsocket-native-cross/pom.xml | 2 +- junixsocket-native-custom/pom.xml | 2 +- junixsocket-native/pom.xml | 2 +- junixsocket-rmi/pom.xml | 2 +- junixsocket-selftest-native-image/pom.xml | 2 +- junixsocket-selftest/pom.xml | 2 +- junixsocket-server/pom.xml | 2 +- junixsocket-tipc/pom.xml | 2 +- junixsocket-vsock/pom.xml | 2 +- pom.xml | 2 +- src/site/markdown/changelog.md | 10 +++++ src/site/markdown/compatibility.md | 4 +- src/site/markdown/customarch.md | 2 +- src/site/markdown/dependency.md | 48 +++++++++++------------ src/site/markdown/release.md | 2 +- 24 files changed, 57 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 9c6307400..5e9c9a67b 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ To include the core junixsocket functionality in your project, add the following com.kohlschutter.junixsocket junixsocket-core - 2.6.1 + 2.6.2 pom ``` diff --git a/junixsocket-codecoverage/pom.xml b/junixsocket-codecoverage/pom.xml index ae070b4e6..a23509a8c 100644 --- a/junixsocket-codecoverage/pom.xml +++ b/junixsocket-codecoverage/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-codecoverage diff --git a/junixsocket-common/pom.xml b/junixsocket-common/pom.xml index 7cdb114de..e556b4c0a 100644 --- a/junixsocket-common/pom.xml +++ b/junixsocket-common/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-common diff --git a/junixsocket-core/pom.xml b/junixsocket-core/pom.xml index d10b3ac0b..831d583fe 100644 --- a/junixsocket-core/pom.xml +++ b/junixsocket-core/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-core diff --git a/junixsocket-demo/pom.xml b/junixsocket-demo/pom.xml index b7082b751..640e85995 100644 --- a/junixsocket-demo/pom.xml +++ b/junixsocket-demo/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-demo diff --git a/junixsocket-dist/pom.xml b/junixsocket-dist/pom.xml index 06d1bedea..6fa9ad0b8 100644 --- a/junixsocket-dist/pom.xml +++ b/junixsocket-dist/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-dist diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml index cc4033898..423635908 100644 --- a/junixsocket-jetty/pom.xml +++ b/junixsocket-jetty/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-jetty diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index 547134e0e..c79df032f 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-mysql diff --git a/junixsocket-native-common/pom.xml b/junixsocket-native-common/pom.xml index 5ef4da19c..92265f6ad 100644 --- a/junixsocket-native-common/pom.xml +++ b/junixsocket-native-common/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml
junixsocket-native-common diff --git a/junixsocket-native-cross/pom.xml b/junixsocket-native-cross/pom.xml index ad7a5fd02..8d1dbe27b 100644 --- a/junixsocket-native-cross/pom.xml +++ b/junixsocket-native-cross/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-native-cross diff --git a/junixsocket-native-custom/pom.xml b/junixsocket-native-custom/pom.xml index 34bcf024c..41226b56d 100644 --- a/junixsocket-native-custom/pom.xml +++ b/junixsocket-native-custom/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-native-custom diff --git a/junixsocket-native/pom.xml b/junixsocket-native/pom.xml index 149f59193..7dfb650c0 100644 --- a/junixsocket-native/pom.xml +++ b/junixsocket-native/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-native diff --git a/junixsocket-rmi/pom.xml b/junixsocket-rmi/pom.xml index cb9899c4c..0b1cf1f63 100644 --- a/junixsocket-rmi/pom.xml +++ b/junixsocket-rmi/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-rmi diff --git a/junixsocket-selftest-native-image/pom.xml b/junixsocket-selftest-native-image/pom.xml index 05c0ce279..7f38c6d98 100644 --- a/junixsocket-selftest-native-image/pom.xml +++ b/junixsocket-selftest-native-image/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-selftest-native-image diff --git a/junixsocket-selftest/pom.xml b/junixsocket-selftest/pom.xml index 34dddd3f4..da51a840a 100644 --- a/junixsocket-selftest/pom.xml +++ b/junixsocket-selftest/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-selftest diff --git a/junixsocket-server/pom.xml b/junixsocket-server/pom.xml index 4e2fa1bf6..49a6ecf74 100644 --- a/junixsocket-server/pom.xml +++ b/junixsocket-server/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-server diff --git a/junixsocket-tipc/pom.xml b/junixsocket-tipc/pom.xml index 091374954..24d90e30a 100644 --- a/junixsocket-tipc/pom.xml +++ b/junixsocket-tipc/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-tipc diff --git a/junixsocket-vsock/pom.xml b/junixsocket-vsock/pom.xml index 8590d5e27..66bae688c 100644 --- a/junixsocket-vsock/pom.xml +++ b/junixsocket-vsock/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 ../pom.xml junixsocket-vsock diff --git a/pom.xml b/pom.xml index 2483bbeec..28fe3760a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.kohlschutter.junixsocket junixsocket - 2.7.0-SNAPSHOT + 2.6.2 pom com.kohlschutter diff --git a/src/site/markdown/changelog.md b/src/site/markdown/changelog.md index d2513e644..7343020e8 100644 --- a/src/site/markdown/changelog.md +++ b/src/site/markdown/changelog.md @@ -9,6 +9,16 @@ The existing API should always be backwards compatible between minor releases (e When upgrading from versions older than 2.4.0, please note that `junixsocket-core` is now a POM-only artifact (`pom`); see [Add junixsocket to your project](dependency.html) for details. +### _(2022-02-08)_ **junixsocket 2.6.2** + +- Add socket connectors for AF_VSOCK, Firecracker +- Add mayStopServerForce to AFSocketServerConnector +- Fix false-positive selftest failure on slow machines +- Fix potential hang in send +- Fix support for TIPC/VSOCK when building GraalVM native images +- Fix serialization of AFSocketAddresses +- Update dependencies, especially use the new mysql.connector.j + ### _(2022-10-26)_ **junixsocket 2.6.1** - Add AFSocket.checkConnectionClosed to probe connection status diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index 264fe86b7..91f1a3aa0 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -11,7 +11,7 @@ should be backwards compatible to releases of the same "major version" (e.g., 2. ## Supported Java versions -junixsocket 2.6.1 is fully compatible with Java 8 and newer (tested up to Java 19). +junixsocket 2.6.2 is fully compatible with Java 8 and newer (tested up to Java 19). ## Supported Java VMs @@ -87,7 +87,7 @@ or [contact Christian Kohlschütter via email](mailto:christian@kohlschutter.com A reliable way to ensure that junixsocket works in your environment is to run the "[selftest](selftest.html)". - java -jar junixsocket-selftest-2.6.1-jar-with-dependencies.jar + java -jar junixsocket-selftest-2.6.2-jar-with-dependencies.jar The last line should say "Selftest PASSED", and you're good to go. diff --git a/src/site/markdown/customarch.md b/src/site/markdown/customarch.md index 9c70aa457..3ff6a18da 100644 --- a/src/site/markdown/customarch.md +++ b/src/site/markdown/customarch.md @@ -86,7 +86,7 @@ for development and testing purposes: com.kohlschutter.junixsocket junixsocket-native-custom - 2.6.1 + 2.6.2 amd64-Linux-gpp-jni diff --git a/src/site/markdown/dependency.md b/src/site/markdown/dependency.md index 411e0c59a..8746acfae 100644 --- a/src/site/markdown/dependency.md +++ b/src/site/markdown/dependency.md @@ -14,7 +14,7 @@ Add the following dependency to your Maven project com.kohlschutter.junixsocket junixsocket-core - 2.6.1 + 2.6.2 pom @@ -26,7 +26,7 @@ following two dependencies instead: com.kohlschutter.junixsocket junixsocket-common - 2.6.1 + 2.6.2 and @@ -34,7 +34,7 @@ and com.kohlschutter.junixsocket junixsocket-native-common - 2.6.1 + 2.6.2 ### Optional dependencies @@ -44,7 +44,7 @@ If you're going to use AFUNIXSocketServer code, add the following dependency: com.kohlschutter.junixsocket junixsocket-server - 2.6.1 + 2.6.2 If you're going to use RMI over Unix sockets, add the following dependency: @@ -52,7 +52,7 @@ If you're going to use RMI over Unix sockets, add the following dependency: com.kohlschutter.junixsocket junixsocket-rmi - 2.6.1 + 2.6.2 If you're going to use the mySQL Connector for Unix sockets, add the following dependency: @@ -60,7 +60,7 @@ If you're going to use the mySQL Connector for Unix sockets, add the following d com.kohlschutter.junixsocket junixsocket-mysql - 2.6.1 + 2.6.2 If you're going to use TIPC, add the following dependency: @@ -68,7 +68,7 @@ If you're going to use TIPC, add the following dependency: com.kohlschutter.junixsocket junixsocket-tipc - 2.6.1 + 2.6.2 If you're going to use VSOCK, add the following dependency: @@ -76,7 +76,7 @@ If you're going to use VSOCK, add the following dependency: com.kohlschutter.junixsocket junixsocket-vsock - 2.6.1 + 2.6.2 If you're going to use the Jetty connectors, add the following dependency: @@ -84,7 +84,7 @@ If you're going to use the Jetty connectors, add the following dependency: com.kohlschutter.junixsocket junixsocket-jetty - 2.6.1 + 2.6.2 @@ -119,35 +119,35 @@ Add the following statements to `build.gradle`; if you have existing dependencie For the common Java code and common native libraries, add: dependencies { - implementation 'com.kohlschutter.junixsocket:junixsocket-core:2.6.1' + implementation 'com.kohlschutter.junixsocket:junixsocket-core:2.6.2' } Some older Gradle versions require `compile` instead of `implementation`, and some older versions have trouble resolving the `junixsocket-core` POM artifact. If you're running into problems (and only then), try the following: dependencies { - implementation 'com.kohlschutter.junixsocket:junixsocket-common:2.6.1' - implementation 'com.kohlschutter.junixsocket:junixsocket-native-scommon:2.6.1' + implementation 'com.kohlschutter.junixsocket:junixsocket-common:2.6.2' + implementation 'com.kohlschutter.junixsocket:junixsocket-native-scommon:2.6.2' } For RMI support, add: - implementation 'com.kohlschutter.junixsocket:junixsocket-rmi:2.6.1' + implementation 'com.kohlschutter.junixsocket:junixsocket-rmi:2.6.2' For MySQL support, add: - implementation 'com.kohlschutter.junixsocket:junixsocket-mysql:2.6.1' + implementation 'com.kohlschutter.junixsocket:junixsocket-mysql:2.6.2' For TIPC support, add: - implementation 'com.kohlschutter.junixsocket:junixsocket-tipc:2.6.1' + implementation 'com.kohlschutter.junixsocket:junixsocket-tipc:2.6.2' For VSOCK support, add: - implementation 'com.kohlschutter.junixsocket:junixsocket-vsock:2.6.1' + implementation 'com.kohlschutter.junixsocket:junixsocket-vsock:2.6.2' For Jetty support, add: - implementation 'com.kohlschutter.junixsocket:junixsocket-jetty:2.6.1' + implementation 'com.kohlschutter.junixsocket:junixsocket-jetty:2.6.2' ### Snapshot versions @@ -184,11 +184,11 @@ databases such as PostgreSQL. If you can't use Maven (instructions above), make sure that the following jars are on your classpath: - * junixsocket-common-2.6.1.jar - * junixsocket-mysql-2.6.1.jar + * junixsocket-common-2.6.2.jar + * junixsocket-mysql-2.6.2.jar * mysql-connector-j-8.0.31.jar (or newer) - * (typically required; can be skipped if you use the custom library below) junixsocket-native-common-2.6.1.jar - * (optionally, if you have a custom architecture) junixsocket-native-custom-2.6.1.jar + * (typically required; can be skipped if you use the custom library below) junixsocket-native-common-2.6.2.jar + * (optionally, if you have a custom architecture) junixsocket-native-custom-2.6.2.jar Use the following connection properties (along with `user`, `password`, and other properties you may have). @@ -217,10 +217,10 @@ to disable SSL with older versions of Connector/J. Make sure that the following jars are on your classpath: - * junixsocket-common-2.6.1.jar + * junixsocket-common-2.6.2.jar * postgresql-42.2.5.jar (or newer; earlier versions should work, too) - * (typically, omit if you use the custom library below) junixsocket-native-common-2.6.1.jar - * (optionally, if you have a custom architecture) junixsocket-native-custom-2.6.1.jar + * (typically, omit if you use the custom library below) junixsocket-native-common-2.6.2.jar + * (optionally, if you have a custom architecture) junixsocket-native-custom-2.6.2.jar Use the following connection properties (along with `user`, `password`, and other properties you may diff --git a/src/site/markdown/release.md b/src/site/markdown/release.md index 29a82efcf..9a6a624e5 100644 --- a/src/site/markdown/release.md +++ b/src/site/markdown/release.md @@ -144,7 +144,7 @@ Run `java -jar junixsocket-selftest/target/junixsocket-selftest-X.Y.Z-jar-with-d Also run the selftest with Java 8, e.g.: - /Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java -jar junixsocket-selftest/target/junixsocket-selftest-2.6.1-jar-with-dependencies.jar + /Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java -jar junixsocket-selftest/target/junixsocket-selftest-2.6.2-jar-with-dependencies.jar Run `junixsocket-native-graalvm/bin/with-graalvm mvn package -pl junixsocket-selftest-native-image -Pnative` (on all native-image supported platforms) to build the GraalVM native-image. Test the native-image From 009dac14a112d7bf1f0fb2e3eeaf5cb8c7f206c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Wed, 8 Feb 2023 20:02:11 +0100 Subject: [PATCH 036/768] Update kohlschutter-parent version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28fe3760a..4f4865491 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter kohlschutter-parent-multirelease - 1.5.2-SNAPSHOT + 1.5.2 ../kohlschutter-parent/kohlschutter-parent-multirelease/pom.xml junixsocket From 1ca9653444fc23041f3acdbe7c2ab571639f20d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Wed, 8 Feb 2023 20:53:19 +0100 Subject: [PATCH 037/768] ThroughputTest: increase delay --- .../test/java/org/newsclub/net/unix/ThroughputTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java index 386068f96..e33613a01 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java @@ -391,7 +391,7 @@ public void run() { @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannel() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { testDatagramChannel(false, true); }); } @@ -399,7 +399,7 @@ public void testDatagramChannel() throws Exception { @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannelDirect() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { testDatagramChannel(true, true); }); } @@ -407,7 +407,7 @@ public void testDatagramChannelDirect() throws Exception { @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannelNonBlocking() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { testDatagramChannel(false, false); }); } @@ -415,7 +415,7 @@ public void testDatagramChannelNonBlocking() throws Exception { @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannelNonBlockingDirect() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { testDatagramChannel(true, false); }); } From 3c63011ee29f9a33c511194abf9943ca5ec96850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Wed, 8 Feb 2023 21:15:43 +0100 Subject: [PATCH 038/768] ThroughputTest: Datagram tests may timeout on macOS Dump exception to stderr if datagram tests timeout, but do not throw exception -- this is a throughput test only. --- .../org/newsclub/net/unix/ThroughputTest.java | 181 ++++++++++-------- 1 file changed, 103 insertions(+), 78 deletions(-) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java index e33613a01..8a0ff67d6 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java @@ -55,6 +55,7 @@ import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; +import org.junit.platform.commons.JUnitException; import com.kohlschutter.annotations.compiletime.SuppressFBWarnings; import com.kohlschutter.util.SystemPropertyUtil; @@ -301,123 +302,147 @@ protected void handleConnection(Socket sock) throws IOException { @Test @SuppressWarnings("PMD.CognitiveComplexity") public void testDatagramPacket() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { - SocketAddress dsAddr = newTempAddressForDatagram(); - SocketAddress dcAddr = newTempAddressForDatagram(); + try { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + SocketAddress dsAddr = newTempAddressForDatagram(); + SocketAddress dcAddr = newTempAddressForDatagram(); - try (DatagramSocket ds = newDatagramSocket(); DatagramSocket dc = newDatagramSocket()) { - if (!ds.isBound()) { - ds.bind(dsAddr); - } - if (!dc.isBound()) { - dc.bind(dcAddr); - } + try (DatagramSocket ds = newDatagramSocket(); DatagramSocket dc = newDatagramSocket()) { + if (!ds.isBound()) { + ds.bind(dsAddr); + } + if (!dc.isBound()) { + dc.bind(dcAddr); + } - dsAddr = ds.getLocalSocketAddress(); - dcAddr = dc.getLocalSocketAddress(); + dsAddr = ds.getLocalSocketAddress(); + dcAddr = dc.getLocalSocketAddress(); - assertNotEquals(dsAddr, dcAddr); + assertNotEquals(dsAddr, dcAddr); - dc.connect(dsAddr); + dc.connect(dsAddr); - AtomicBoolean keepRunning = new AtomicBoolean(true); - Executors.newSingleThreadScheduledExecutor().schedule(() -> { - keepRunning.set(false); - }, NUM_MILLISECONDS, TimeUnit.MILLISECONDS); + AtomicBoolean keepRunning = new AtomicBoolean(true); + Executors.newSingleThreadScheduledExecutor().schedule(() -> { + keepRunning.set(false); + }, NUM_MILLISECONDS, TimeUnit.MILLISECONDS); - AtomicLong readTotal = new AtomicLong(); - long sentTotal = 0; + AtomicLong readTotal = new AtomicLong(); + long sentTotal = 0; - new Thread() { - final DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE], PAYLOAD_SIZE); + new Thread() { + final DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE], PAYLOAD_SIZE); - @Override - public void run() { - try { - while (!Thread.interrupted() && !ds.isClosed()) { - try { - ds.receive(dp); - } catch (SocketTimeoutException e) { - continue; + @Override + public void run() { + try { + while (!Thread.interrupted() && !ds.isClosed()) { + try { + ds.receive(dp); + } catch (SocketTimeoutException e) { + continue; + } + int read = dp.getLength(); + if (read != PAYLOAD_SIZE && read != 0) { + throw new IOException("Unexpected response length: " + read); + } + readTotal.addAndGet(dp.getLength()); } - int read = dp.getLength(); - if (read != PAYLOAD_SIZE && read != 0) { - throw new IOException("Unexpected response length: " + read); + } catch (SocketException e) { + if (keepRunning.get()) { + e.printStackTrace(); } - readTotal.addAndGet(dp.getLength()); - } - } catch (SocketException e) { - if (keepRunning.get()) { + } catch (IOException e) { e.printStackTrace(); } - } catch (IOException e) { - e.printStackTrace(); } - } - }.start(); - - long time = System.currentTimeMillis(); + }.start(); - DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE], PAYLOAD_SIZE); - byte[] data = dp.getData(); - for (int i = 0; i < data.length; i++) { - data[i] = (byte) i; - } + long time = System.currentTimeMillis(); - while (keepRunning.get()) { - try { - dc.send(dp); - } catch (PortUnreachableException e) { - e.addSuppressed(new Exception(dp.getSocketAddress().toString())); - throw e; + DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE], PAYLOAD_SIZE); + byte[] data = dp.getData(); + for (int i = 0; i < data.length; i++) { + data[i] = (byte) i; } - sentTotal += PAYLOAD_SIZE; - } - time = System.currentTimeMillis() - time; - keepRunning.set(false); - ds.close(); // terminate server - long readTotal0 = readTotal.get(); + while (keepRunning.get()) { + try { + dc.send(dp); + } catch (PortUnreachableException e) { + e.addSuppressed(new Exception(dp.getSocketAddress().toString())); + throw e; + } + sentTotal += PAYLOAD_SIZE; + } + time = System.currentTimeMillis() - time; + keepRunning.set(false); + ds.close(); // terminate server - reportResults(stbTestType() + " DatagramPacket", ((1000f * readTotal0 / time) / 1000f - / 1000f) + " MB/s for payload size " + PAYLOAD_SIZE + "; " + String.format( - Locale.ENGLISH, "%.1f%% packet loss", 100 * (1 - (readTotal0 - / (float) sentTotal)))); - } - }); + long readTotal0 = readTotal.get(); + reportResults(stbTestType() + " DatagramPacket", ((1000f * readTotal0 / time) / 1000f + / 1000f) + " MB/s for payload size " + PAYLOAD_SIZE + "; " + String.format( + Locale.ENGLISH, "%.1f%% packet loss", 100 * (1 - (readTotal0 + / (float) sentTotal)))); + } + }); + } catch (JUnitException e) { + // Ignore timeout failure (this is a throughput test only) + e.printStackTrace(); + } } @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannel() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { - testDatagramChannel(false, true); - }); + try { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + testDatagramChannel(false, true); + }); + } catch (JUnitException e) { + // Ignore timeout failure (this is a throughput test only) + e.printStackTrace(); + } } @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannelDirect() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { - testDatagramChannel(true, true); - }); + try { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + testDatagramChannel(true, true); + }); + } catch (JUnitException e) { + // Ignore timeout failure (this is a throughput test only) + e.printStackTrace(); + } } @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannelNonBlocking() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { - testDatagramChannel(false, false); - }); + try { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + testDatagramChannel(false, false); + }); + } catch (JUnitException e) { + // Ignore timeout failure (this is a throughput test only) + e.printStackTrace(); + } } @Test @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS) public void testDatagramChannelNonBlockingDirect() throws Exception { - assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 10), () -> { - testDatagramChannel(true, false); - }); + try { + assertTimeoutPreemptively(Duration.ofSeconds(NUM_SECONDS + 5), () -> { + testDatagramChannel(true, false); + }); + } catch (JUnitException e) { + // Ignore timeout failure (this is a throughput test only) + e.printStackTrace(); + } } private void testDatagramChannel(boolean direct, boolean blocking) throws Exception { From d7a9be4eb8cebae8d6dd69647e944be7d359f3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 3 Mar 2023 13:04:46 +0100 Subject: [PATCH 039/768] Bump version to 2.6.3-SNAPSHOT --- junixsocket-codecoverage/pom.xml | 2 +- junixsocket-common/pom.xml | 3 ++- junixsocket-core/pom.xml | 2 +- junixsocket-demo/pom.xml | 2 +- junixsocket-dist/pom.xml | 2 +- junixsocket-jetty/pom.xml | 2 +- junixsocket-mysql/pom.xml | 2 +- junixsocket-native-common/pom.xml | 2 +- junixsocket-native-cross/pom.xml | 2 +- junixsocket-native-custom/pom.xml | 2 +- junixsocket-native/pom.xml | 2 +- junixsocket-rmi/pom.xml | 2 +- junixsocket-selftest-native-image/pom.xml | 2 +- junixsocket-selftest/pom.xml | 2 +- junixsocket-server/pom.xml | 2 +- junixsocket-tipc/pom.xml | 4 +++- junixsocket-vsock/pom.xml | 4 +++- pom.xml | 2 +- 18 files changed, 23 insertions(+), 18 deletions(-) diff --git a/junixsocket-codecoverage/pom.xml b/junixsocket-codecoverage/pom.xml index a23509a8c..7b90b83aa 100644 --- a/junixsocket-codecoverage/pom.xml +++ b/junixsocket-codecoverage/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-codecoverage diff --git a/junixsocket-common/pom.xml b/junixsocket-common/pom.xml index e556b4c0a..d5f6d1c29 100644 --- a/junixsocket-common/pom.xml +++ b/junixsocket-common/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-common @@ -25,6 +25,7 @@ -h ${kohlschutter.project.base.directory}/junixsocket-native/src/main/c + ${xlint.compiler.arg} diff --git a/junixsocket-core/pom.xml b/junixsocket-core/pom.xml index 831d583fe..0e859e128 100644 --- a/junixsocket-core/pom.xml +++ b/junixsocket-core/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-core diff --git a/junixsocket-demo/pom.xml b/junixsocket-demo/pom.xml index 640e85995..19a05f0c7 100644 --- a/junixsocket-demo/pom.xml +++ b/junixsocket-demo/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-demo diff --git a/junixsocket-dist/pom.xml b/junixsocket-dist/pom.xml index 6fa9ad0b8..2847f6d70 100644 --- a/junixsocket-dist/pom.xml +++ b/junixsocket-dist/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-dist diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml index 423635908..c8cfbe2dc 100644 --- a/junixsocket-jetty/pom.xml +++ b/junixsocket-jetty/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-jetty diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index c79df032f..1d141942e 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-mysql diff --git a/junixsocket-native-common/pom.xml b/junixsocket-native-common/pom.xml index 92265f6ad..104baa38a 100644 --- a/junixsocket-native-common/pom.xml +++ b/junixsocket-native-common/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-native-common diff --git a/junixsocket-native-cross/pom.xml b/junixsocket-native-cross/pom.xml index 8d1dbe27b..6dd74698b 100644 --- a/junixsocket-native-cross/pom.xml +++ b/junixsocket-native-cross/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-native-cross diff --git a/junixsocket-native-custom/pom.xml b/junixsocket-native-custom/pom.xml index 41226b56d..bcf45ada3 100644 --- a/junixsocket-native-custom/pom.xml +++ b/junixsocket-native-custom/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-native-custom diff --git a/junixsocket-native/pom.xml b/junixsocket-native/pom.xml index 7dfb650c0..468db7af3 100644 --- a/junixsocket-native/pom.xml +++ b/junixsocket-native/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-native diff --git a/junixsocket-rmi/pom.xml b/junixsocket-rmi/pom.xml index 0b1cf1f63..8a75c101f 100644 --- a/junixsocket-rmi/pom.xml +++ b/junixsocket-rmi/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-rmi diff --git a/junixsocket-selftest-native-image/pom.xml b/junixsocket-selftest-native-image/pom.xml index 7f38c6d98..a03ceff9d 100644 --- a/junixsocket-selftest-native-image/pom.xml +++ b/junixsocket-selftest-native-image/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-selftest-native-image diff --git a/junixsocket-selftest/pom.xml b/junixsocket-selftest/pom.xml index da51a840a..d4a29cf1f 100644 --- a/junixsocket-selftest/pom.xml +++ b/junixsocket-selftest/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-selftest diff --git a/junixsocket-server/pom.xml b/junixsocket-server/pom.xml index 49a6ecf74..70553a66a 100644 --- a/junixsocket-server/pom.xml +++ b/junixsocket-server/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-server diff --git a/junixsocket-tipc/pom.xml b/junixsocket-tipc/pom.xml index 24d90e30a..c08de041d 100644 --- a/junixsocket-tipc/pom.xml +++ b/junixsocket-tipc/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-tipc @@ -75,6 +75,8 @@ --patch-module ${patchArgs.org.newsclub.net.unix} + + ${xlint.compiler.arg} diff --git a/junixsocket-vsock/pom.xml b/junixsocket-vsock/pom.xml index 66bae688c..9c07208a0 100644 --- a/junixsocket-vsock/pom.xml +++ b/junixsocket-vsock/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT ../pom.xml junixsocket-vsock @@ -75,6 +75,8 @@ --patch-module ${patchArgs.org.newsclub.net.unix} + + ${xlint.compiler.arg} diff --git a/pom.xml b/pom.xml index 4f4865491..9eaff6255 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.kohlschutter.junixsocket junixsocket - 2.6.2 + 2.6.3-SNAPSHOT pom com.kohlschutter From 31b246f313003f377e4848b283d169eb3c869f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 3 Mar 2023 13:06:37 +0100 Subject: [PATCH 040/768] AFDatagramSocketImpl: Deprecate getTTL/setTTL --- .../main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java index 2ce894155..13b17cd41 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java @@ -236,11 +236,13 @@ protected final int peekData(DatagramPacket p) throws IOException { } @Override + @Deprecated protected final byte getTTL() throws IOException { return (byte) (getTimeToLive() & 0xFF); } @Override + @Deprecated protected final void setTTL(byte ttl) throws IOException { // ignored } From 9054aa7c7d02a758c912da5d6330ddf4dae551ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 3 Mar 2023 13:06:48 +0100 Subject: [PATCH 041/768] Update kohlschutter-parent dependency; add reasons for code coverage exclusions --- .../src/main/java/org/newsclub/net/unix/NativeUnixSocket.java | 2 +- .../src/test/java/org/newsclub/net/unix/AFDatagramUtil.java | 2 +- .../src/main/java/org/newsclub/net/unix/demo/DemoHelper.java | 2 +- .../java/org/newsclub/lib/junixsocket/common/NarMetadata.java | 2 +- .../java/org/newsclub/lib/junixsocket/custom/NarMetadata.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java | 2 +- pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java index facf61fda..b8d869dce 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java @@ -71,7 +71,7 @@ final class NativeUnixSocket { private static Throwable initError = null; - @ExcludeFromCodeCoverageGeneratedReport + @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable") private NativeUnixSocket() { throw new UnsupportedOperationException("No instances"); } diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java index b61087820..92674fadd 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java @@ -27,7 +27,7 @@ * @author Christian Kohlschütter */ public final class AFDatagramUtil { - @ExcludeFromCodeCoverageGeneratedReport + @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable") private AFDatagramUtil() { throw new IllegalStateException("No instances"); } diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java index 00c7d309e..e79c727c1 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java @@ -37,7 +37,7 @@ * Just a helper class to simplify controlling the demo from the command line. */ public final class DemoHelper { - @ExcludeFromCodeCoverageGeneratedReport + @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable") private DemoHelper() { throw new IllegalStateException("No instances"); } diff --git a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java index e1f0ed9d0..57e0ad2e3 100644 --- a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java +++ b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java @@ -25,7 +25,7 @@ * @author Christian Kohlschütter */ public final class NarMetadata { - @ExcludeFromCodeCoverageGeneratedReport + @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable") private NarMetadata() { throw new IllegalStateException("No instances"); } diff --git a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java index bd66e21b1..6ef4dc068 100644 --- a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java +++ b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java @@ -25,7 +25,7 @@ * @author Christian Kohlschütter */ public final class NarMetadata { - @ExcludeFromCodeCoverageGeneratedReport + @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable") private NarMetadata() { throw new IllegalStateException("No instances"); } diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java index e1dc0aec6..e0abe2730 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java @@ -60,7 +60,7 @@ final class RMIPorts { */ static final int PLAIN_FILE_SOCKET = Integer.MAX_VALUE; - @ExcludeFromCodeCoverageGeneratedReport + @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable") private RMIPorts() { throw new UnsupportedOperationException("No instances"); } diff --git a/pom.xml b/pom.xml index 9eaff6255..6717e8637 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter kohlschutter-parent-multirelease - 1.5.2 + 1.5.3 ../kohlschutter-parent/kohlschutter-parent-multirelease/pom.xml junixsocket From 339907cb2130173743bfbfb1e42cc17d584de69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 2 Jun 2023 19:33:54 +0200 Subject: [PATCH 042/768] FileDescriptorCast: Provide cast to Integer (where available) Providing the internal integer value for a FileDescriptor (where available and accessible). https://github.com/kohlschutter/junixsocket/issues/132 --- .../org/newsclub/net/unix/FileDescriptorCast.java | 11 +++++++++++ .../org/newsclub/net/unix/FileDescriptorCastTest.java | 9 +++++++++ src/site/markdown/filedescriptors.md | 5 +++++ 3 files changed, 25 insertions(+) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java index e9d7b3508..63ef83661 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java @@ -137,6 +137,17 @@ public FileInputStream provideAs(FileDescriptorCast fdc, return FD_IS_PROVIDER.apply(fdc.getFileDescriptor()); } }); + addProvider(Integer.class, new CastingProvider() { + @Override + public Integer provideAs(FileDescriptorCast fdc, Class desiredType) + throws IOException { + int val = NativeUnixSocket.getFD(fdc.getFileDescriptor()); + if (val == -1) { + throw new IOException("Not a valid file descriptor"); + } + return val; + } + }); if (AFSocket.supports(AFSocketCapability.CAPABILITY_FD_AS_REDIRECT)) { addProvider(Redirect.class, new CastingProvider() { diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java index 6738a5c6e..fa812c5da 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java @@ -95,6 +95,15 @@ public void testStdout() throws IOException { } } + @Test + public void testCastAsInteger() throws Exception { + assertEquals(0, FileDescriptorCast.using(FileDescriptor.in).as(Integer.class)); + assertEquals(1, FileDescriptorCast.using(FileDescriptor.out).as(Integer.class)); + assertEquals(2, FileDescriptorCast.using(FileDescriptor.err).as(Integer.class)); + assertThrows(IOException.class, () -> FileDescriptorCast.using(new FileDescriptor()).as( + Integer.class)); + } + @Test public void testRandomAccessFile() throws Exception { File tempFile = AFUNIXSocketAddress.newTempPath(false); diff --git a/src/site/markdown/filedescriptors.md b/src/site/markdown/filedescriptors.md index 58524abaa..ce7a450e6 100644 --- a/src/site/markdown/filedescriptors.md +++ b/src/site/markdown/filedescriptors.md @@ -111,6 +111,7 @@ When you receive a FileDescriptor from another process, you want to use it as if First, you instantiate a `FileDescriptorCast` instance using the FileDescriptor of your choice, then you specify as what class you want to access it: FileDescriptor fd = ...; + // NOTE: check `fd.valid()` or an `IOException` may be thrown. Class desiredClass = ...; T instance = FileDescriptorCast.using(fd).as(desiredClass); @@ -127,6 +128,10 @@ If the file descriptor is a Socket, you can use: AFUNIXSocket sock = FileDescriptorCast.using(fd).as(AFUNIXSocket.class); // etc. +If you want to access the native file descriptor value as an integer (only where supported), you can use: + + int fdVal = FileDescriptorCast.using(fd).as(Integer.class); // won't work for all types on Windows + Note that if the specified `FileDescriptor` is incompatible with the target class, a `ClassCastException` is thrown. Also be aware that this technically isn't a cast, since a different object reference is returned. In order to check if a file descriptor can be "cast" to a particular class, you can use `FileDescriptorCast#isAvailable` and `FileDescriptorCast#availableTypes`: From b3be66c008c77ffbade1d56433e5319b1c0f8367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 2 Jun 2023 19:40:08 +0200 Subject: [PATCH 043/768] Bump jetty version --- junixsocket-jetty/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml index c8cfbe2dc..50421c8bc 100644 --- a/junixsocket-jetty/pom.xml +++ b/junixsocket-jetty/pom.xml @@ -12,7 +12,7 @@ junixsocket-jetty ${project.parent.basedir} - 11.0.13 + 11.0.15 junixsocket for Jetty @@ -63,4 +63,4 @@ test - \ No newline at end of file + From 7ff3c4089e8600c06fffa78e20b949685f1806d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 2 Jun 2023 21:35:40 +0200 Subject: [PATCH 044/768] FileDescriptorCast: Add support for file descriptor integers Add "unsafeUsing" method taking an integer as an argument. Add annotation and logic to ensure everyone knows that this is somewhat unsafe, and allow deactivation of such methods at runtime. https://github.com/kohlschutter/junixsocket/issues/132 --- .../java/org/newsclub/net/unix/AFSocket.java | 15 +++++ .../newsclub/net/unix/AFSocketCapability.java | 14 +++++ .../newsclub/net/unix/FileDescriptorCast.java | 55 +++++++++++++++++++ .../java/org/newsclub/net/unix/Unsafe.java | 41 ++++++++++++++ .../net/unix/FileDescriptorCastTest.java | 10 ++++ junixsocket-native/src/main/c/capabilities.c | 5 ++ src/site/markdown/filedescriptors.md | 6 ++ 7 files changed, 146 insertions(+) create mode 100644 junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java index 4e06ec5b3..299c430bb 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java @@ -429,6 +429,21 @@ public static final boolean supports(AFSocketCapability capability) { return (CAPABILITIES & capability.getBitmask()) != 0; } + /** + * Checks if the current environment (system platform, native library, etc.) supports "unsafe" + * operations (as controlled via the {@link AFSocketCapability#CAPABILITY_UNSAFE} capability). + * + * If supported, the method returns normally. If not supported, an {@link IOException} is thrown. + * + * @throws IOException if "unsafe" operations are not supported. + * @see Unsafe + */ + public static final void ensureUnsafeSupported() throws IOException { + if (!AFSocket.supports(AFSocketCapability.CAPABILITY_UNSAFE)) { + throw new IOException("Unsafe operations are not supported in this environment"); + } + } + @Override public final synchronized void close() throws IOException { IOException superException = null; diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java index da16b2fcd..7c7497eb6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java @@ -25,6 +25,10 @@ * * You can check whether your environment supports a given capability by calling * {@link AFSocket#supports(AFSocketCapability)}. + * + * You can also manually disable a given capability by specifying a System property of the form + * org.newsclub.net.unix.library.disable.CAPABILITY_SOMETHING_SOMETHING=true + * when invoking the JVM (make sure this property is set before junixsocket is accessed). */ public enum AFSocketCapability { // see org_newsclub_net_unix_NativeUnixSocket.c in junixsocket-native @@ -116,6 +120,16 @@ public enum AFSocketCapability { */ CAPABILITY_ZERO_LENGTH_SEND(11), + /** + * Support for "unsafe" operations. + * + * Trading-in safety for speed or simplicity may be justified sometimes. + * + * @see Unsafe + * @see AFSocket#ensureUnsafeSupported() + */ + CAPABILITY_UNSAFE(12), + ; // end of list private final int bitmask; diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java index 63ef83661..e5b49b161 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java @@ -137,6 +137,13 @@ public FileInputStream provideAs(FileDescriptorCast fdc, return FD_IS_PROVIDER.apply(fdc.getFileDescriptor()); } }); + addProvider(FileDescriptor.class, new CastingProvider() { + @Override + public FileDescriptor provideAs(FileDescriptorCast fdc, + Class desiredType) throws IOException { + return fdc.getFileDescriptor(); + } + }); addProvider(Integer.class, new CastingProvider() { @Override public Integer provideAs(FileDescriptorCast fdc, Class desiredType) @@ -301,6 +308,54 @@ public static FileDescriptorCast using(FileDescriptor fdObj) throws IOException return new FileDescriptorCast(fdObj, map == null ? GLOBAL_PROVIDERS : map); } + /** + * Creates a {@link FileDescriptorCast} using the given native file descriptor value. + *

+ * This method + * is inherently unsafe as it may + *

    + *
  1. make assumptions on the internal system representation of a file descriptor (which differs + * between Windows and Unix, for example).
  2. + *
  3. provide access to resources that are otherwise not accessible
  4. + *
+ *

+ * Note that the values {@code 0}, {@code 1}, and {@code 2} are always mapped to + * {@link FileDescriptor#in}, {@link FileDescriptor#out}, and {@link FileDescriptor#err}, + * respectively. + * + * @param fd The system-native file descriptor value. + * @return The {@link FileDescriptorCast} instance. + * @throws IOException on error, especially if the given file descriptor is invalid or + * unsupported, or when "unsafe" operations are unavailable or manually disabled for the + * current environment. + */ + @Unsafe + public static FileDescriptorCast unsafeUsing(int fd) throws IOException { + AFSocket.ensureUnsafeSupported(); + + FileDescriptor fdObj; + + switch (fd) { + case -1: + throw new IOException("Not a valid file descriptor"); + case 0: + fdObj = FileDescriptor.in; + break; + case 1: + fdObj = FileDescriptor.out; + break; + case 2: + fdObj = FileDescriptor.err; + break; + default: + fdObj = new FileDescriptor(); + NativeUnixSocket.initFD(fdObj, fd); + break; + } + + return using(fdObj); + } + private static void triggerInit() { AFUNIXSocketAddress.addressFamily().getClass(); // trigger registration AFTIPCSocketAddress.addressFamily().getClass(); // trigger registration diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java new file mode 100644 index 000000000..72e9458be --- /dev/null +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java @@ -0,0 +1,41 @@ +/* + * junixsocket + * + * Copyright 2009-2022 Christian Kohlschütter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.newsclub.net.unix; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Declares some operation "unsafe", which is guarded via + * {@link AFSocketCapability#CAPABILITY_UNSAFE}. + *

+ * Methods annotated with this type should also call {@link AFSocket#ensureUnsafeSupported()} to + * check availability at runtime. + *

+ * NOTE: This annotation has nothing to do with {@code sun.misc.Unsafe}. + * + * @author Christian Kohlschütter + * @see AFSocket#ensureUnsafeSupported() + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface Unsafe { + +} diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java index fa812c5da..818bc2897 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java @@ -19,6 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -104,6 +105,15 @@ public void testCastAsInteger() throws Exception { Integer.class)); } + @Test + @AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNSAFE) + public void testUnsafeCast() throws Exception { + assertEquals(1, FileDescriptorCast.unsafeUsing(1).as(Integer.class)); + assertEquals(-2, FileDescriptorCast.unsafeUsing(-2).as(Integer.class)); + assertSame(FileDescriptor.out, FileDescriptorCast.unsafeUsing(1).as(FileDescriptor.class)); + assertThrows(IOException.class, () -> FileDescriptorCast.unsafeUsing(-1).as(Integer.class)); + } + @Test public void testRandomAccessFile() throws Exception { File tempFile = AFUNIXSocketAddress.newTempPath(false); diff --git a/junixsocket-native/src/main/c/capabilities.c b/junixsocket-native/src/main/c/capabilities.c index a94b1347d..46375aa17 100644 --- a/junixsocket-native/src/main/c/capabilities.c +++ b/junixsocket-native/src/main/c/capabilities.c @@ -36,6 +36,7 @@ static int CAPABILITY_UNIX_DOMAIN = (1 << 8); static int CAPABILITY_VSOCK = (1 << 9); static int CAPABILITY_VSOCK_DGRAM = (1 << 10); static int CAPABILITY_ZERO_LENGTH_SEND = (1 << 11); +static int CAPABILITY_UNSAFE = (1 << 12); CK_IGNORE_UNUSED_VARIABLE_END void init_capabilities(JNIEnv *env CK_UNUSED) { @@ -54,6 +55,10 @@ JNIEXPORT jint JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_capabilities( { int capabilities = 0; +#if !defined(_WIN32) + capabilities |= CAPABILITY_UNSAFE; +#endif + if(supportsUNIX()) { capabilities |= CAPABILITY_UNIX_DOMAIN; diff --git a/src/site/markdown/filedescriptors.md b/src/site/markdown/filedescriptors.md index ce7a450e6..4b0dc6b49 100644 --- a/src/site/markdown/filedescriptors.md +++ b/src/site/markdown/filedescriptors.md @@ -28,6 +28,12 @@ You can also get the file descriptor from some classes in the Java API, for exam FileDescriptor stdout = FileDescriptor.out; FileDescriptor stderr = FileDescriptor.err; +### Getting a FileDescriptor from a native fd integer value + +You may use a somewhat "unsafe" operation to convert a system-native file descriptor, described as an integer value, to a `FileDescriptor` (or other types, see below), via `FileDescriptorCast.unsafeUsing(fdVal).as(FileDescriptor.class)`. + +This functionality may not be available in all environments (e.g., on Windows, or when manually disabled by setting the system property `-Dorg.newsclub.net.unix.library.disable.CAPABILITY_UNSAFE=true`). + ## Sending and receiving File Descriptors A very useful feature of Unix Domain Sockets is the ability to send and receive file descriptors From 8bef3c8f7d1c46477d38766cb29ff8b2a588fce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 2 Jun 2023 21:49:16 +0200 Subject: [PATCH 045/768] Bump maven dependency versions --- junixsocket-demo/pom.xml | 6 +++--- junixsocket-jetty/pom.xml | 4 ++-- junixsocket-mysql/pom.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/junixsocket-demo/pom.xml b/junixsocket-demo/pom.xml index 19a05f0c7..c2aeb4409 100644 --- a/junixsocket-demo/pom.xml +++ b/junixsocket-demo/pom.xml @@ -47,7 +47,7 @@ com.mysql mysql-connector-j - 8.0.32 + 8.0.33 org.postgresql postgresql - 42.5.3 + 42.6.0 provided @@ -75,7 +75,7 @@ com.squareup.okhttp3 okhttp - 4.10.0 + 4.11.0 diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml index 50421c8bc..9d5c3bfaf 100644 --- a/junixsocket-jetty/pom.xml +++ b/junixsocket-jetty/pom.xml @@ -34,13 +34,13 @@ org.slf4j slf4j-simple - 2.0.6 + 2.0.7 test com.squareup.okhttp3 okhttp - 4.10.0 + 4.11.0 test diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index 1d141942e..fbca2de49 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -26,7 +26,7 @@ com.mysql mysql-connector-j - 8.0.32 + 8.0.33 provided From 447feb8b23a5618f83bbebb3da13625ee279703a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 13:38:49 +0200 Subject: [PATCH 046/768] module-info: Make sure compile time annotation dependencies are transitive --- junixsocket-common/src/main/java/module-info.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/junixsocket-common/src/main/java/module-info.java b/junixsocket-common/src/main/java/module-info.java index 849cfa966..c509dba82 100644 --- a/junixsocket-common/src/main/java/module-info.java +++ b/junixsocket-common/src/main/java/module-info.java @@ -6,6 +6,6 @@ requires java.base; requires static java.rmi; - requires static com.kohlschutter.annotations.compiletime; + requires static transitive com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; } From b40968f138acf760903e15763d614c67e5d1a3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 13:39:40 +0200 Subject: [PATCH 047/768] Bump kohlschutter-parent dependency to 1.5.4-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6717e8637..70bd474a9 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter kohlschutter-parent-multirelease - 1.5.3 + 1.5.4-SNAPSHOT ../kohlschutter-parent/kohlschutter-parent-multirelease/pom.xml junixsocket From 507268fb1273bb9a6ddde8cdb2bc55f7771e9201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 13:40:38 +0200 Subject: [PATCH 048/768] Remove unnecessary Maven configs --- junixsocket-dist/pom.xml | 1 - junixsocket-selftest/pom.xml | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/junixsocket-dist/pom.xml b/junixsocket-dist/pom.xml index 2847f6d70..4ec699f13 100644 --- a/junixsocket-dist/pom.xml +++ b/junixsocket-dist/pom.xml @@ -66,7 +66,6 @@ org.apache.maven.plugins maven-assembly-plugin - 3.4.2 build-dist diff --git a/junixsocket-selftest/pom.xml b/junixsocket-selftest/pom.xml index d4a29cf1f..cb431b5bf 100644 --- a/junixsocket-selftest/pom.xml +++ b/junixsocket-selftest/pom.xml @@ -269,16 +269,6 @@ - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - From 3adf2d513b92604b3330e8cb6633f1156aa790c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 13:40:56 +0200 Subject: [PATCH 049/768] junixsocket-selftest-native-image: Update GraalVM plugin dependency --- junixsocket-selftest-native-image/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/junixsocket-selftest-native-image/pom.xml b/junixsocket-selftest-native-image/pom.xml index a03ceff9d..98ce2782a 100644 --- a/junixsocket-selftest-native-image/pom.xml +++ b/junixsocket-selftest-native-image/pom.xml @@ -51,7 +51,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.19 + 0.9.22 From d8f28a74c9e4c57ad0cd0688ec7654bf4ab6576f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 13:41:51 +0200 Subject: [PATCH 050/768] Code cleanup Address some Xlint warnings --- .../newsclub/net/unix/AFAddressFamily.java | 2 +- .../newsclub/net/unix/AFDatagramSocket.java | 4 +- .../newsclub/net/unix/AFSocketAddress.java | 5 ++- .../newsclub/net/unix/AFUNIXServerSocket.java | 2 +- .../net/unix/AFUNIXSocketAddress.java | 2 + .../net/unix/AFSocketCapabilityCondition.java | 6 +++ .../newsclub/net/unix/CancelAcceptTest.java | 4 ++ .../newsclub/net/unix/SelftestProvider.java | 2 +- .../net/unix/domain/SocketFactoryTest.java | 41 ++++++++++--------- .../unix/jetty/AFSocketServerConnector.java | 2 + 10 files changed, 43 insertions(+), 27 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java index a1f048088..40340849d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java @@ -357,7 +357,7 @@ public synchronized SelectorProvider getSelectorProvider() { } try { selectorProvider = (SelectorProvider) Class.forName(selectorProviderClassname).getMethod( - "provider", new Class[0]).invoke(null); + "provider", new Class[0]).invoke(null); } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException | ClassNotFoundException | RuntimeException e) { throw new IllegalStateException("Cannot instantiate selector provider for " diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java index d2ad3ab23..3cb0fa216 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java @@ -70,11 +70,11 @@ protected AFDatagramSocket(final AFDatagramSocketImpl impl) throws IOExceptio protected abstract AFDatagramChannel newChannel(); /** - * Returns the {@link AncillaryDataSupport} instance. + * Returns the {@code AncillaryDataSupport} instance. * * @return The instance. */ - protected final AncillaryDataSupport getAncillaryDataSupport() { + final AncillaryDataSupport getAncillaryDataSupport() { return ancillaryDataSupport; } diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index eea3cdb5d..06647ef99 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -106,6 +106,7 @@ protected ByteBuffer initialValue() { * @param af The address family. * @throws SocketException on error. */ + @SuppressWarnings("cast") protected AFSocketAddress(int port, final byte[] socketAddress, ByteBuffer nativeAddress, AFAddressFamily af) throws SocketException { /* @@ -116,7 +117,7 @@ protected AFSocketAddress(int port, final byte[] socketAddress, ByteBuffer nativ * addresses can only be IPv4 or IPv6 (at least as of Java 16 and earlier). */ super(AFInetAddress.createUnresolvedHostname(socketAddress, af), 0); - this.nativeAddress = nativeAddress == null ? null : (ByteBuffer) nativeAddress.duplicate() + this.nativeAddress = nativeAddress == null ? null : (ByteBuffer)(Object) nativeAddress.duplicate() .rewind(); if (port < -1) { throw new IllegalArgumentException("port out of range"); @@ -144,7 +145,7 @@ protected AFSocketAddress(int port, final byte[] socketAddress, ByteBuffer nativ * @param port A sentinel port number. */ @SuppressWarnings("PMD.UnusedFormalParameter") - protected AFSocketAddress(Class clazz, int port) { + AFSocketAddress(Class clazz, int port) { super(InetAddress.getLoopbackAddress(), port); this.nativeAddress = null; this.bytes = new byte[0]; diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java index 2d2ad367d..b6b3c0909 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java @@ -142,7 +142,7 @@ public static AFUNIXServerSocket forceBindOn(final AFUNIXSocketAddress forceAddr } @Override - protected AFUNIXSocketImpl newImpl(FileDescriptor fdObj) throws SocketException { + protected AFSocketImpl newImpl(FileDescriptor fdObj) throws SocketException { return new AFUNIXSocketImpl(fdObj); } diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java index 136d06f40..4d1aa3493 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java @@ -92,6 +92,7 @@ private AFUNIXSocketAddress(int port, final byte[] socketAddress, ByteBuffer nat * @deprecated Use {@link #of(File)} instead. * @see #of(File) */ + @Deprecated public AFUNIXSocketAddress(File socketFile) throws SocketException { this(socketFile, 0); } @@ -106,6 +107,7 @@ public AFUNIXSocketAddress(File socketFile) throws SocketException { * @deprecated Use {@link #of(File, int)} instead. * @see #of(File, int) */ + @Deprecated public AFUNIXSocketAddress(File socketFile, int port) throws SocketException { this(port, of(socketFile, port).getPathAsBytes(), of(socketFile, port) .getNativeAddressDirectBuffer()); diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java index 987f587c5..35cfe9e77 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java @@ -28,6 +28,12 @@ import org.junit.jupiter.api.extension.ExtensionContext; public final class AFSocketCapabilityCondition implements ExecutionCondition { + /** + * Constructs a new {@link AFSocketCapabilityCondition}. + */ + public AFSocketCapabilityCondition() { + } + @SuppressWarnings("exports") @Override public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java index fcbe9e3b9..0e9fbceac 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java @@ -26,6 +26,7 @@ import java.net.Socket; import java.net.SocketAddress; import java.net.SocketException; +import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; import org.junit.jupiter.api.Test; @@ -80,9 +81,11 @@ protected ExceptionHandlingDecision handleException(Exception e) { try (Socket sock = connectTo(serverThread.getServerAddress())) { // open and close + Objects.requireNonNull(sock); // silence Xlint warning } try (Socket sock = connectTo(serverThread.getServerAddress())) { // open and close + Objects.requireNonNull(sock); // silence Xlint warning } @SuppressWarnings("resource") @@ -119,6 +122,7 @@ protected ExceptionHandlingDecision handleException(Exception e) { try { try (Socket sock = connectTo(serverAddress)) { + Objects.requireNonNull(sock); // silence Xlint warning fail("ServerSocket should have been closed already"); } String noticeNoSocketException = checkKnownConditionDidNotThrowSocketException(); diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java index a708736f2..b47a2d67e 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java @@ -126,7 +126,7 @@ private void registerTest(String group, Class test) { public Map[]> tests() { Map[]> tests = new LinkedHashMap<>(); testMap.forEach((key, set) -> { - tests.put(key, set.toArray(new Class[0])); + tests.put(key, set.toArray(new Class[0])); }); return tests; diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java index 6e349c8b6..58ce2e67b 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java @@ -18,6 +18,7 @@ package org.newsclub.net.unix.domain; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.fail; import java.io.File; import java.net.InetAddress; @@ -83,7 +84,7 @@ public void testURISchemeCeateSocketWithIllegalArguments() throws Exception { assertThrows(IllegalArgumentException.class, () -> { // Illegal local port try (Socket sock = factory.createSocket("file:///", 0, null, -1)) { - // not reached + fail("Should not be reached: " + sock); } }); } @@ -95,61 +96,61 @@ public void testURISchemeCeateSocketWithInvalidHostname() throws Exception { assertThrows(SocketException.class, () -> { // We don't support empty hosts try (Socket sock = factory.createSocket("", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // We don't support empty hosts try (Socket sock = factory.createSocket("", 0, null, 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // We don't support IP addresses try (Socket sock = factory.createSocket(InetAddress.getByName(""), 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // We don't support IP addresses try (Socket sock = factory.createSocket(InetAddress.getLoopbackAddress(), 0, null, 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // file:// has an empty path component try (Socket sock = factory.createSocket("file:", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // file:// has an empty path component try (Socket sock = factory.createSocket("file:/", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // file:// has an empty path component try (Socket sock = factory.createSocket("file://", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // file://not-absolute is not an absolute path (three slashes needed) try (Socket sock = factory.createSocket("file://not-absolute", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // incomplete try (Socket sock = factory.createSocket("[", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // encoded; incomplete trailing escape try (Socket sock = factory.createSocket("file%3A%2F%2F%", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); } @@ -161,37 +162,37 @@ public void testURISchemeCeateSocketWithHostnameValidCases() throws Exception { assertThrows(SocketException.class, () -> { // file exists (root directory), but is definitely not a unix socket try (Socket sock = factory.createSocket("file:///", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // file exists (root directory), but is definitely not a unix socket try (Socket sock = factory.createSocket("file://localhost/", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // file exists (root directory), but is definitely not a unix socket try (Socket sock = factory.createSocket("[file:///]", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // file exists (root directory), but is definitely not a unix socket try (Socket sock = factory.createSocket("[file:///", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // encoded; file exists (root directory), but is definitely not a unix socket try (Socket sock = factory.createSocket("file%3A%2F%2F%2F", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); assertThrows(SocketException.class, () -> { // encoded; file exists (root directory), but is definitely not a unix socket try (Socket sock = factory.createSocket("file%3A%2F%2Flocalhost%2F", 0)) { - // not reached + fail("Should not be reached: " + sock); } }); } @@ -209,7 +210,7 @@ public void testSystemProperty() throws Exception { assertThrows(IllegalStateException.class, () -> { // system property "org.newsclub.net.unix.socket.default" not configured try (Socket sock = factory.createSocket(hostnameToConnectTo, 0)) { - // not reached + fail("Should not be reached: " + sock); } }); @@ -217,7 +218,7 @@ public void testSystemProperty() throws Exception { assertThrows(IllegalStateException.class, () -> { // system property "org.newsclub.net.unix.socket.default" not configured try (Socket sock = factory.createSocket(hostnameToConnectTo, 0)) { - // not reached + fail("Should not be reached: " + sock); } }); @@ -225,7 +226,7 @@ public void testSystemProperty() throws Exception { assertThrows(SocketException.class, () -> { // file exists (root directory), but is definitely not a unix socket try (Socket sock = factory.createSocket(hostnameToConnectTo, 0)) { - // not reached + fail("Should not be reached: " + sock); } }); } finally { diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java index 402ac663b..96342b14e 100644 --- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java +++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java @@ -179,6 +179,7 @@ private SelectorManager newSelectorManager(Executor executor, Scheduler schedule * @see #getListenSocketAddress() */ @ManagedAttribute("The Unix-Domain path this connector listens to") + @Deprecated public Path getUnixDomainPath() { if (listenSocketAddress instanceof AFUNIXSocketAddress) { AFUNIXSocketAddress addr = (AFUNIXSocketAddress) listenSocketAddress; @@ -202,6 +203,7 @@ public Path getUnixDomainPath() { * @deprecated Use {@link #setListenSocketAddress(AFSocketAddress)} instead. * @see #setListenSocketAddress(AFSocketAddress) */ + @Deprecated public void setUnixDomainPath(Path unixDomainPath) { try { this.listenSocketAddress = AFUNIXSocketAddress.of(unixDomainPath); From 0b7c996344258939ff715bb5aba2e8b8d29c5af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 13:43:31 +0200 Subject: [PATCH 051/768] Bump version to 2.7.0-SNAPSHOT --- junixsocket-codecoverage/pom.xml | 2 +- junixsocket-common/pom.xml | 2 +- junixsocket-core/pom.xml | 2 +- junixsocket-demo/pom.xml | 2 +- junixsocket-dist/pom.xml | 2 +- junixsocket-jetty/pom.xml | 2 +- junixsocket-mysql/pom.xml | 2 +- junixsocket-native-common/pom.xml | 2 +- junixsocket-native-cross/pom.xml | 2 +- junixsocket-native-custom/pom.xml | 2 +- junixsocket-native/pom.xml | 2 +- junixsocket-rmi/pom.xml | 2 +- junixsocket-selftest-native-image/pom.xml | 2 +- junixsocket-selftest/pom.xml | 2 +- junixsocket-server/pom.xml | 2 +- junixsocket-tipc/pom.xml | 2 +- junixsocket-vsock/pom.xml | 2 +- pom.xml | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/junixsocket-codecoverage/pom.xml b/junixsocket-codecoverage/pom.xml index 7b90b83aa..ae070b4e6 100644 --- a/junixsocket-codecoverage/pom.xml +++ b/junixsocket-codecoverage/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-codecoverage diff --git a/junixsocket-common/pom.xml b/junixsocket-common/pom.xml index d5f6d1c29..bd5ec297c 100644 --- a/junixsocket-common/pom.xml +++ b/junixsocket-common/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-common diff --git a/junixsocket-core/pom.xml b/junixsocket-core/pom.xml index 0e859e128..d10b3ac0b 100644 --- a/junixsocket-core/pom.xml +++ b/junixsocket-core/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-core diff --git a/junixsocket-demo/pom.xml b/junixsocket-demo/pom.xml index c2aeb4409..811766d90 100644 --- a/junixsocket-demo/pom.xml +++ b/junixsocket-demo/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-demo diff --git a/junixsocket-dist/pom.xml b/junixsocket-dist/pom.xml index 4ec699f13..6c11fa9d5 100644 --- a/junixsocket-dist/pom.xml +++ b/junixsocket-dist/pom.xml @@ -8,7 +8,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-dist diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml index 9d5c3bfaf..12231062e 100644 --- a/junixsocket-jetty/pom.xml +++ b/junixsocket-jetty/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-jetty diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml index fbca2de49..34a81f264 100644 --- a/junixsocket-mysql/pom.xml +++ b/junixsocket-mysql/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-mysql diff --git a/junixsocket-native-common/pom.xml b/junixsocket-native-common/pom.xml index 104baa38a..5ef4da19c 100644 --- a/junixsocket-native-common/pom.xml +++ b/junixsocket-native-common/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native-common diff --git a/junixsocket-native-cross/pom.xml b/junixsocket-native-cross/pom.xml index 6dd74698b..ad7a5fd02 100644 --- a/junixsocket-native-cross/pom.xml +++ b/junixsocket-native-cross/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native-cross diff --git a/junixsocket-native-custom/pom.xml b/junixsocket-native-custom/pom.xml index bcf45ada3..34bcf024c 100644 --- a/junixsocket-native-custom/pom.xml +++ b/junixsocket-native-custom/pom.xml @@ -7,7 +7,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native-custom diff --git a/junixsocket-native/pom.xml b/junixsocket-native/pom.xml index 468db7af3..149f59193 100644 --- a/junixsocket-native/pom.xml +++ b/junixsocket-native/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-native diff --git a/junixsocket-rmi/pom.xml b/junixsocket-rmi/pom.xml index 8a75c101f..cb9899c4c 100644 --- a/junixsocket-rmi/pom.xml +++ b/junixsocket-rmi/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-rmi diff --git a/junixsocket-selftest-native-image/pom.xml b/junixsocket-selftest-native-image/pom.xml index 98ce2782a..f1085397d 100644 --- a/junixsocket-selftest-native-image/pom.xml +++ b/junixsocket-selftest-native-image/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-selftest-native-image diff --git a/junixsocket-selftest/pom.xml b/junixsocket-selftest/pom.xml index cb431b5bf..9d0ad15ab 100644 --- a/junixsocket-selftest/pom.xml +++ b/junixsocket-selftest/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-selftest diff --git a/junixsocket-server/pom.xml b/junixsocket-server/pom.xml index 70553a66a..4e2fa1bf6 100644 --- a/junixsocket-server/pom.xml +++ b/junixsocket-server/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-server diff --git a/junixsocket-tipc/pom.xml b/junixsocket-tipc/pom.xml index c08de041d..ebbf600a7 100644 --- a/junixsocket-tipc/pom.xml +++ b/junixsocket-tipc/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-tipc diff --git a/junixsocket-vsock/pom.xml b/junixsocket-vsock/pom.xml index 9c07208a0..99f25887e 100644 --- a/junixsocket-vsock/pom.xml +++ b/junixsocket-vsock/pom.xml @@ -6,7 +6,7 @@ com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT ../pom.xml junixsocket-vsock diff --git a/pom.xml b/pom.xml index 70bd474a9..f7b63a5e7 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.kohlschutter.junixsocket junixsocket - 2.6.3-SNAPSHOT + 2.7.0-SNAPSHOT pom com.kohlschutter From a4f02b4e58bd0c569a6f9cad7896df56fac49bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 14:09:57 +0200 Subject: [PATCH 052/768] Tested with Java 20 --- README.md | 2 +- src/site/markdown/compatibility.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e9c9a67b..77d010699 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ other address/protocol families (such as [AF_TIPC](http://tipc.io/) and AF_VSOCK * Provides a selftest package with 100+ tests to ensure compatibility with any target platform. * Apache 2.0 licensed. -`*` (Tested up to Java 19; support for Java 7 was dropped in version 2.5.0). +`*` (Tested up to Java 20; support for Java 7 was dropped in version 2.5.0). ## Quick links diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index 91f1a3aa0..b4a83d1ca 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -11,7 +11,7 @@ should be backwards compatible to releases of the same "major version" (e.g., 2. ## Supported Java versions -junixsocket 2.6.2 is fully compatible with Java 8 and newer (tested up to Java 19). +junixsocket 2.6.2 is fully compatible with Java 8 and newer (tested up to Java 20). ## Supported Java VMs From 7044f54d0afcb7dd56ca3c22e4368cd987d97309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 15:39:33 +0200 Subject: [PATCH 053/768] Code cleanup (address Xlint warnings) --- .../java/org/newsclub/net/unix/SelectorTest.java | 2 +- .../java/org/newsclub/net/unix/ThroughputTest.java | 2 +- .../jetty/unixdomain/server/UnixDomainTest.java | 2 +- junixsocket-mysql/src/main/java/module-info.java | 2 +- .../newsclub/net/unix/rmi/AFRMISocketFactory.java | 12 ++++++------ .../net/unix/rmi/AFUNIXRMISocketFactory.java | 2 +- .../net/unix/rmi/RemoteFileDescriptorBase.java | 4 ++-- .../org/newsclub/net/unix/tipc/SelftestProvider.java | 2 +- .../newsclub/net/unix/vsock/SelftestProvider.java | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java index 9ab760e47..0980f88f0 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java @@ -253,7 +253,7 @@ private void testConnectionClose(boolean clientCloseImmediately, boolean checkIn int numReadable = 0; int numClosedChannelException = 0; - int timeout = 5000; + long timeout = 5000; selectLoop : while (timeout > 0) { long time = System.currentTimeMillis(); while (selector.select(timeout) != 0) { diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java index 8a0ff67d6..f670046f7 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java @@ -279,7 +279,7 @@ protected void handleConnection(Socket sock) throws IOException { bb.clear(); bb.put(createTestData(PAYLOAD_SIZE)); bb.flip(); - int remaining = sc.write(bb); + long remaining = sc.write(bb); bb.clear(); long read; // limited by net.local.stream.recvspace / sendspace etc. diff --git a/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java b/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java index 78b2027e5..76e3a6dd1 100644 --- a/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java +++ b/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java @@ -193,7 +193,7 @@ public void handle(String target, Request jettyRequest, HttpServletRequest reque .of(unixDomainPath)); HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector)); - httpClient.getProxyConfiguration().getProxies().add(new HttpProxy("localhost", fakeProxyPort)); + httpClient.getProxyConfiguration().addProxy(new HttpProxy("localhost", fakeProxyPort)); httpClient.start(); try { ContentResponse response = httpClient.newRequest("localhost", fakeServerPort).timeout(5, diff --git a/junixsocket-mysql/src/main/java/module-info.java b/junixsocket-mysql/src/main/java/module-info.java index 494994200..ed6b7ba1f 100644 --- a/junixsocket-mysql/src/main/java/module-info.java +++ b/junixsocket-mysql/src/main/java/module-info.java @@ -9,7 +9,7 @@ requires java.base; // requires mysql.connector.java; // until 8.0.30 - requires mysql.connector.j; // from 8.0.31 + requires transitive mysql.connector.j; // from 8.0.31 requires static com.kohlschutter.annotations.compiletime; requires static org.eclipse.jdt.annotation; diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java index ba49e7e5e..8dc0cc49b 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java @@ -49,15 +49,15 @@ public abstract class AFRMISocketFactory extends RMISocketFactory implements Ext Closeable { private static final long serialVersionUID = 1L; - private RMIClientSocketFactory defaultClientFactory; - private RMIServerSocketFactory defaultServerFactory; + private transient RMIClientSocketFactory defaultClientFactory; + private transient RMIServerSocketFactory defaultServerFactory; - private AFNaming naming; + private transient AFNaming naming; - private AFRMIService rmiService = null; + private transient AFRMIService rmiService = null; - private final Map> openServerSockets = new HashMap<>(); - private final Set> openSockets = new HashSet<>(); + private final transient Map> openServerSockets = new HashMap<>(); + private final transient Set> openSockets = new HashSet<>(); /** * Constructor required per definition. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java index c04fb153e..e054e8655 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java @@ -52,7 +52,7 @@ public class AFUNIXRMISocketFactory extends AFRMISocketFactory { private String socketPrefix; private String socketSuffix; - private final Map credentials = new HashMap<>(); + private final transient Map credentials = new HashMap<>(); /** * Constructor required per definition. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java index 32827f6f2..86a2e9fc4 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java @@ -81,7 +81,7 @@ public abstract class RemoteFileDescriptorBase implements Externalizable, Clo protected final transient AtomicReference resource = new AtomicReference<>(); private int magicValue; - private FileDescriptor fd; + private transient FileDescriptor fd; private AFUNIXRMISocketFactory socketFactory; /** @@ -89,7 +89,7 @@ public abstract class RemoteFileDescriptorBase implements Externalizable, Clo * * @see #readExternal(ObjectInput) */ - RemoteFileDescriptorBase() { + public RemoteFileDescriptorBase() { } RemoteFileDescriptorBase(AFUNIXRMISocketFactory socketFactory, T stream, FileDescriptor fd, diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java index b7dad98ca..ec33e33b3 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java @@ -100,7 +100,7 @@ private void registerTest(String group, Class test) { public Map[]> tests() { Map[]> tests = new LinkedHashMap<>(); testMap.forEach((key, set) -> { - tests.put(key, set.toArray(new Class[0])); + tests.put(key, set.toArray(new Class[0])); }); return tests; diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java index fb0888d51..1c492165d 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java @@ -100,7 +100,7 @@ private void registerTest(String group, Class test) { public Map[]> tests() { Map[]> tests = new LinkedHashMap<>(); testMap.forEach((key, set) -> { - tests.put(key, set.toArray(new Class[0])); + tests.put(key, set.toArray(new Class[0])); }); return tests; From 2ac1f973c6002d7da36b18b9a20ba8fde90795ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 18:05:05 +0200 Subject: [PATCH 054/768] crossclang: Ignore "-reproducible" linker flag when desired Xcode started to enabling this a while ago; this doesn't work for non-macOS linkers. --- junixsocket-native/crossclang/bin/clang | 11 +++++++++++ .../junixsocket-native.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/junixsocket-native/crossclang/bin/clang b/junixsocket-native/crossclang/bin/clang index 97aa0cfef..bad25f781 100755 --- a/junixsocket-native/crossclang/bin/clang +++ b/junixsocket-native/crossclang/bin/clang @@ -80,6 +80,9 @@ hideUnknownWarningWarnings=0 hasExportDynamic=0 ignoreExportDynamic=0 +hasReproducible=0 +ignoreReproducible=0 + skipGccArg=0 analyze=0 @@ -115,6 +118,7 @@ while [ $# -gt 0 ]; do -Xcrossclang-ld64-sdk-version ) ld64_sdk_version="$1"; shift ; skipArg=1 ;; -Xcrossclang-hide-unknown-warning-warnings ) hideUnknownWarningWarnings=1 ; skipArg=1 ;; -Xcrossclang-ignore-export-dynamic) ignoreExportDynamic=1 ; skipArg=1 ;; + -Xcrossclang-ignore-reproducible) ignoreReproducible=1 ; skipArg=1 ;; # -index-store-path ) shift ; skipArg=1 ;; # if you're hitting this, set "Enable Index-While-Building Functionality=No" in Xcode build settings instead -filelist ) fileList="$1" ; shift; skipArg=1 ;; -current_version ) shift ; skipArg=1 ;; @@ -155,6 +159,8 @@ while [ $# -gt 0 ]; do -Xlinker ) if [[ "$1" == "-export_dynamic" ]]; then hasExportDynamic=1 + elif [[ "$1" == "-reproducible" ]]; then + hasReproducible=1 elif [[ -n "$1" ]]; then clangArgs+=("-Xlinker" "$1") gccArgs+=("-Xlinker" "$1") @@ -186,6 +192,11 @@ if [[ $hasExportDynamic -eq 1 && $ignoreExportDynamic -eq 0 ]]; then gccArgs+=("-Xlinker" "-export_dynamic") fi +if [[ $hasReproducible -eq 1 && $ignoreReproducible -eq 0 ]]; then + clangArgs+=("-Xlinker" "-reproducible") + # gccArgs+=("-Xlinker" "-reproducible") +fi + if [[ $analyze -gt 0 && $gccMode -gt 0 ]]; then # When using the static code analyzer, switch back to clang compiler=clang diff --git a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj index 9737a7bde..abe1066f1 100644 --- a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj +++ b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj @@ -4451,7 +4451,7 @@ "-fno-common", "-fvisibility=hidden", ); - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible"; RUN_CLANG_STATIC_ANALYZER = YES; SKIP_INSTALL = YES; WARNING_CFLAGS = ( @@ -4532,7 +4532,7 @@ "-fno-common", "-fvisibility=hidden", ); - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible"; RUN_CLANG_STATIC_ANALYZER = YES; SKIP_INSTALL = YES; WARNING_CFLAGS = ( From 2e475c73a081098467ecc34f0487dee5a04093fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 18:05:50 +0200 Subject: [PATCH 055/768] native: Disable intermediate text-based stubs generation This is not supported on non-macOS targets, and not necessary. --- junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj index abe1066f1..0dc140172 100644 --- a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj +++ b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj @@ -4438,6 +4438,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_INTERMEDIATE_TEXT_BASED_STUBS = NO; HEADER_SEARCH_PATHS = src/main/c/jni; MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; ONLY_ACTIVE_ARCH = YES; @@ -4519,6 +4520,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_INTERMEDIATE_TEXT_BASED_STUBS = NO; HEADER_SEARCH_PATHS = src/main/c/jni; MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; ONLY_ACTIVE_ARCH = YES; From 7465f6dba216903261a8343c0be8c15db79df526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 18:11:34 +0200 Subject: [PATCH 056/768] native: Fall back to IllegalStateException when other exception missing In the unlikely event that an exception that is believed to exist in the environment does not, let's just throw IllegalStateException. If that one was missing, we'd have other problems. --- junixsocket-native/src/main/c/exceptions.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/junixsocket-native/src/main/c/exceptions.c b/junixsocket-native/src/main/c/exceptions.c index 3d1a28d9a..e421ff025 100644 --- a/junixsocket-native/src/main/c/exceptions.c +++ b/junixsocket-native/src/main/c/exceptions.c @@ -46,6 +46,12 @@ void init_exceptions(JNIEnv *env) { for (int i=0; iGetMethodID(env, exc, "", "(Ljava/lang/String;)V"); From 9d3f3e22a6f7846f8d5f3c83073a3fef86369389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 18:12:56 +0200 Subject: [PATCH 057/768] selftest: Fix twice-included classes from junixsocket-common upon shade --- junixsocket-selftest/pom.xml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/junixsocket-selftest/pom.xml b/junixsocket-selftest/pom.xml index 9d0ad15ab..5fc889ff7 100644 --- a/junixsocket-selftest/pom.xml +++ b/junixsocket-selftest/pom.xml @@ -101,24 +101,6 @@ ${project.build.directory}/sources-java8 true - - ${project.parent.basedir}/junixsocket-common/src/main/java - - ** - - - module-info.java - - - - ${project.parent.basedir}/junixsocket-common/src/main/java8 - - ** - - - module-info.java - - ${project.parent.basedir}/junixsocket-common/src/test/java From 5191fc43098b9fc1ae5980424a4ee54a764f304f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 18:22:14 +0200 Subject: [PATCH 058/768] graalvm: build-selftest can use GRAALVM_HOME if set --- junixsocket-native-graalvm/bin/build-selftest | 2 ++ 1 file changed, 2 insertions(+) diff --git a/junixsocket-native-graalvm/bin/build-selftest b/junixsocket-native-graalvm/bin/build-selftest index 396095776..7e82759aa 100755 --- a/junixsocket-native-graalvm/bin/build-selftest +++ b/junixsocket-native-graalvm/bin/build-selftest @@ -8,6 +8,8 @@ # cd "$(dirname $0)/../" +[[ -n "$GRAALVM_HOME" ]] && export PATH="$GRAALVM_HOME"/bin:$PATH + java -version 2>&1 | grep -q GraalVM if [[ $? -ne 0 ]]; then echo Error: JVM is not a GraalVM. >&2 From 4f808158f6065c25391dc8915962fdbbc87506c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 18:27:27 +0200 Subject: [PATCH 059/768] graalvm: Update serialization-config.json --- .../serialization-config.json | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/serialization-config.json b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/serialization-config.json index c6a8c2121..3ec8b3ef9 100644 --- a/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/serialization-config.json +++ b/junixsocket-common/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-common/serialization-config.json @@ -1,9 +1,35 @@ { "types":[ + { + "name":"byte[]" + }, + { + "name":"java.lang.String" + }, { "name":"java.net.InetAddress" + }, + { + "name":"java.net.InetSocketAddress" + }, + { + "name":"java.net.SocketAddress" + }, + { + "name":"org.newsclub.net.unix.AFSocketAddress" + }, + { + "name":"org.newsclub.net.unix.AFUNIXSocketAddress" + }, + { + "name":"org.newsclub.net.unix.AFTIPCSocketAddress" + }, + { + "name":"org.newsclub.net.unix.AFVSOCKSocketAddress" } ], "lambdaCapturingTypes":[ + ], + "proxies":[ ] } \ No newline at end of file From 8a8cf8c27ac0db994e91ccd43372ea7e4644a367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 4 Jun 2023 18:28:06 +0200 Subject: [PATCH 060/768] junixsocket-native-graalvm: Update automatic graalvm config files --- .../reflect-config.json | 5 ++++- .../resource-config.json | 2 +- .../serialization-config.json | 20 +++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json index a0f66c8c9..5b90d440b 100644 --- a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json +++ b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json @@ -102,6 +102,7 @@ {"name":"testHttpUnix","parameterTypes":[] }, {"name":"testParseURIandBack","parameterTypes":[] }, {"name":"testSchemesAvailable","parameterTypes":[] }, + {"name":"testSerialize","parameterTypes":[] }, {"name":"testSocatString","parameterTypes":[] }, {"name":"testURITemplate","parameterTypes":[] }, {"name":"testURITemplateWithPortNumber","parameterTypes":[] }, @@ -204,10 +205,12 @@ "methods":[ {"name":"","parameterTypes":[] }, {"name":"testAvailableTypes","parameterTypes":[] }, + {"name":"testCastAsInteger","parameterTypes":[] }, {"name":"testInvalidFileDescriptor","parameterTypes":[] }, {"name":"testPipe","parameterTypes":[] }, {"name":"testRandomAccessFile","parameterTypes":[] }, - {"name":"testStdout","parameterTypes":[] } + {"name":"testStdout","parameterTypes":[] }, + {"name":"testUnsafeCast","parameterTypes":[] } ] }, { diff --git a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json index dca265359..1f02c5b28 100644 --- a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json +++ b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json @@ -20,7 +20,7 @@ "pattern":"\\QMETA-INF/services/org.junit.platform.launcher.TestExecutionListener\\E" }, { - "pattern":"\\Qlib/aarch64-MacOSX-clang/jni/libjunixsocket-native-2.6.1-SNAPSHOT.dylib\\E" + "pattern":"\\Qlib/aarch64-MacOSX-clang/jni/libjunixsocket-native-2.7.0-SNAPSHOT.dylib\\E" } ]}, "bundles":[] diff --git a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json index d35fed355..6a715a1a1 100644 --- a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json +++ b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json @@ -1,12 +1,32 @@ { "types":[ + { + "name":"byte[]" + }, + { + "name":"java.lang.String" + }, { "name":"java.net.InetAddress" }, + { + "name":"java.net.InetSocketAddress" + }, + { + "name":"java.net.SocketAddress" + }, { "name":"org.junit.platform.launcher.TestIdentifier$SerializedForm" + }, + { + "name":"org.newsclub.net.unix.AFSocketAddress" + }, + { + "name":"org.newsclub.net.unix.AFUNIXSocketAddress" } ], "lambdaCapturingTypes":[ + ], + "proxies":[ ] } \ No newline at end of file From 76accd24a8b8fe6e1b41b8bc7eec53f34892b9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 9 Jun 2023 15:30:39 +0200 Subject: [PATCH 061/768] native: Update Xcode config, code cleanup - Enable parallel builds - Disable "unsafe-buffer-usage" warnings --- .../junixsocket-native.xcodeproj/project.pbxproj | 7 +++++-- .../xcshareddata/xcschemes/All Architectures.xcscheme | 2 +- .../xcshareddata/xcschemes/aarch64-linux-gnu.xcscheme | 2 +- .../xcshareddata/xcschemes/aarch64-w64-mingw32.xcscheme | 2 +- .../xcschemes/amd64-unknown-openbsd6.9.xcscheme | 2 +- .../xcshareddata/xcschemes/arm64-apple-macos11.xcscheme | 2 +- .../xcshareddata/xcschemes/armv6--linux-gnueabihf.xcscheme | 2 +- .../xcshareddata/xcschemes/current.xcscheme | 2 +- .../xcschemes/i386-pc-solaris2.11_m64.xcscheme | 2 +- .../xcshareddata/xcschemes/powerpc-ibm-aix7.2.xcscheme | 2 +- .../xcshareddata/xcschemes/powerpc-ibm-os400.xcscheme | 2 +- .../xcshareddata/xcschemes/powerpc64le-linux-gnu.xcscheme | 2 +- .../xcshareddata/xcschemes/riscv64-redhat-linux.xcscheme | 2 +- .../xcshareddata/xcschemes/s390x-ibm-linux-gnu.xcscheme | 2 +- .../xcshareddata/xcschemes/sparc-sun-solaris2.11.xcscheme | 2 +- .../xcschemes/x86_64-alpine-linux-musl.xcscheme | 2 +- .../xcschemes/x86_64-apple-darwin18.2.0.xcscheme | 2 +- .../xcschemes/x86_64-portbld-dragonfly6.0.xcscheme | 2 +- .../xcschemes/x86_64-unknown-freebsd12.1.xcscheme | 2 +- .../xcschemes/x86_64-unknown-linux-gnu.xcscheme | 2 +- .../xcschemes/x86_64-unknown-netbsd9.0.xcscheme | 2 +- .../xcshareddata/xcschemes/x86_64-w64-mingw32.xcscheme | 2 +- junixsocket-native/src/main/c/address.c | 2 +- junixsocket-native/src/main/c/credentials.c | 4 +++- junixsocket-native/src/main/c/polling.c | 7 +++++++ 25 files changed, 37 insertions(+), 25 deletions(-) diff --git a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj index 0dc140172..60697a593 100644 --- a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj +++ b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 53; objects = { /* Begin PBXAggregateTarget section */ @@ -2551,7 +2551,8 @@ 43D436B0261A55D0002D0C12 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1410; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; TargetAttributes = { 432EF186261AD52100F4A583 = { CreatedOnToolsVersion = 11.3.1; @@ -4474,6 +4475,7 @@ "-Wno-unused-command-line-argument", "-Werror-implicit-function-declaration", "-Wno-declaration-after-statement", + "-Wno-unsafe-buffer-usage", ); }; name = Debug; @@ -4556,6 +4558,7 @@ "-Wno-unused-command-line-argument", "-Werror-implicit-function-declaration", "-Wno-declaration-after-statement", + "-Wno-unsafe-buffer-usage", ); }; name = Release; diff --git a/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme b/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme index 9c89240bf..a3388611f 100644 --- a/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme +++ b/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme @@ -1,6 +1,6 @@ cr_uid = process.kp_eproc.e_ucred.cr_uid; cr->cr_ngroups = process.kp_eproc.e_ucred.cr_ngroups; + + gid_t *groups = process.kp_eproc.e_ucred.cr_groups; for(int i=cr->cr_ngroups-1;i>=0;i--) { - cr->cr_groups[i] =process.kp_eproc.e_ucred.cr_groups[i]; + cr->cr_groups[i] = groups[i]; } return ret; diff --git a/junixsocket-native/src/main/c/polling.c b/junixsocket-native/src/main/c/polling.c index 371993a15..25bcb4d7e 100644 --- a/junixsocket-native/src/main/c/polling.c +++ b/junixsocket-native/src/main/c/polling.c @@ -355,8 +355,15 @@ JNIEXPORT jint JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_poll jintArray ropsObj = (*env)->GetObjectField(env, pollFdObj, fieldID_rops); struct pollfd* pollFd = calloc(nfds, sizeof(struct pollfd)); + if(pollFd == NULL) { + return 0; + } jint *buf = calloc(nfds, sizeof(jint)); + if(buf == NULL) { + free(pollFd); + return 0; + } (*env)->GetIntArrayRegion(env, opsObj, 0, nfds, buf); for(int i=0; i Date: Sat, 10 Jun 2023 16:06:54 +0200 Subject: [PATCH 062/768] codecoverage: Simplify aggregating code coverage results from selftests Currently, we cannot easily report code coverage since no single environment can cover all code branches. Add some helper scripts to collect code coverage statistics by running junixsocket-selftest on target environments, aggregating them in the junixsocket-codecoverage project. --- .../jacoco-extra/.gitignore | 2 ++ junixsocket-codecoverage/jacoco-extra/README | 25 +++++++++++++++++++ .../jacoco-extra/rerun-aggregate-coverage.sh | 4 +++ .../jacoco-extra/run-selftest-coverage.sh | 17 +++++++++++++ junixsocket-codecoverage/pom.xml | 4 ++- 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 junixsocket-codecoverage/jacoco-extra/.gitignore create mode 100644 junixsocket-codecoverage/jacoco-extra/README create mode 100755 junixsocket-codecoverage/jacoco-extra/rerun-aggregate-coverage.sh create mode 100755 junixsocket-codecoverage/jacoco-extra/run-selftest-coverage.sh diff --git a/junixsocket-codecoverage/jacoco-extra/.gitignore b/junixsocket-codecoverage/jacoco-extra/.gitignore new file mode 100644 index 000000000..f6a7da6fc --- /dev/null +++ b/junixsocket-codecoverage/jacoco-extra/.gitignore @@ -0,0 +1,2 @@ +lib/ +*.zip diff --git a/junixsocket-codecoverage/jacoco-extra/README b/junixsocket-codecoverage/jacoco-extra/README new file mode 100644 index 000000000..cb1e87cbb --- /dev/null +++ b/junixsocket-codecoverage/jacoco-extra/README @@ -0,0 +1,25 @@ +Place additional jacoco *.exec files here to improve code coverage reporting. + +Make sure to delete all outdated *.exec files first. + +Collect code coverage results by running junixsocket-selftest on all supported +target platforms and configurations. Make sure to test in environments with +certain features enabled/disabled and configured differently (e.g., TIPC +enabled but not configured). + +Run the following command to collect these *.exec files on a target system: + +./run-selftest-coverage.sh +(this may download the JaCoCo agent jar if it's not already there) + +The test files will be stored under junixsocket-codecoverage/target. + +Depending on your setup (shared directory or not), you may now need to +aggregate these *.exec files. + +Then, on the machine aggregating the results, run + +./rerun-aggregate-coverage.sh + +which will set up the aggregate report under +junixsocket-codecoverage/target/site/jacoco-aggregate/index.html diff --git a/junixsocket-codecoverage/jacoco-extra/rerun-aggregate-coverage.sh b/junixsocket-codecoverage/jacoco-extra/rerun-aggregate-coverage.sh new file mode 100755 index 000000000..e57d43ae8 --- /dev/null +++ b/junixsocket-codecoverage/jacoco-extra/rerun-aggregate-coverage.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd "$(dirname $0)"/../.. +mvn verify -Pstrict -Prelease -rf :junixsocket-common -P \!code-quality,\!documentation -DskipTests diff --git a/junixsocket-codecoverage/jacoco-extra/run-selftest-coverage.sh b/junixsocket-codecoverage/jacoco-extra/run-selftest-coverage.sh new file mode 100755 index 000000000..7bbac9c79 --- /dev/null +++ b/junixsocket-codecoverage/jacoco-extra/run-selftest-coverage.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +cd $(dirname "$0") + +[[ -n "$JACOCO_VERSION" ]] || JACOCO_VERSION=0.8.10 + +if [[ ! -e "lib/jacocoagent.jar" ]]; then + wget "https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/${JACOCO_VERSION}/jacoco-${JACOCO_VERSION}.zip" -O jacoco.zip + + unzip jacoco.zip lib/jacocoagent.jar +fi + +mkdir -p ../target + +java \ +-javaagent:./lib/jacocoagent.jar=destfile=../target/$(uuidgen).exec,excludes='org/apache/maven/**:org/junit/**:org/apiguardian/**:sun/**' \ +-jar ../../junixsocket-selftest/target/junixsocket-selftest-*-jar-with-dependencies.jar diff --git a/junixsocket-codecoverage/pom.xml b/junixsocket-codecoverage/pom.xml index ae070b4e6..c74ca477a 100644 --- a/junixsocket-codecoverage/pom.xml +++ b/junixsocket-codecoverage/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 junixsocket-codecoverage pom From 79007c5f78c57a32621f37015a2faef78c4b3455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sat, 10 Jun 2023 16:09:07 +0200 Subject: [PATCH 063/768] test: rmi: Allow null junixsocket version --- .../java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java index 152324723..77d489c8e 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java @@ -18,7 +18,6 @@ package org.newsclub.net.unix.rmi; import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; import org.junit.jupiter.api.Test; import org.newsclub.net.unix.AFSocket; @@ -35,7 +34,6 @@ public class JunixsocketVersionTest { @Test public void testVersion() { String version = AFSocket.getVersion(); - assertNotNull(version); assertNotEquals("", version); } } From 4f3ace01714085e7619a936cf0d700d0817aed86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Tue, 13 Jun 2023 18:00:49 +0200 Subject: [PATCH 064/768] native: Ignore "--reproducible" flag This is automatically added in recent Xcode's, and may not be available on crossplatform targets. --- junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj index 60697a593..af3a10e4d 100644 --- a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj +++ b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj @@ -3371,6 +3371,7 @@ CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_STYLE = Automatic; MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -3381,6 +3382,7 @@ CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_STYLE = Automatic; MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; From 614939863d090ae434cd9b43e4c5e33b755ee95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Tue, 13 Jun 2023 21:46:51 +0200 Subject: [PATCH 065/768] crossclang: Add flag for custom clang binary; fix whitespaces in paths --- junixsocket-native/crossclang/bin/clang | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/junixsocket-native/crossclang/bin/clang b/junixsocket-native/crossclang/bin/clang index bad25f781..5b7e5ddd5 100755 --- a/junixsocket-native/crossclang/bin/clang +++ b/junixsocket-native/crossclang/bin/clang @@ -114,6 +114,7 @@ while [ $# -gt 0 ]; do -Xcrossclang-llvm-name ) llvmName="$1"; shift ; skipArg=1 ;; -Xcrossclang-use-ldshim ) useLdShim=1 ; skipArg=1 ;; -Xcrossclang-use-gcc=* ) gccMode=1 ; compiler="${v#-Xcrossclang-use-gcc=}" ; skipArg=1 ;; + -Xcrossclang-use-clang=* ) compiler="${v#-Xcrossclang-use-clang=}" ; skipArg=1 ;; -Xcrossclang-output-strip-lib-prefix ) outputStripLibPrefix=1 ; skipArg=1 ;; -Xcrossclang-ld64-sdk-version ) ld64_sdk_version="$1"; shift ; skipArg=1 ;; -Xcrossclang-hide-unknown-warning-warnings ) hideUnknownWarningWarnings=1 ; skipArg=1 ;; @@ -273,13 +274,14 @@ if [[ $gccMode -gt 0 ]]; then clangArgs=( ${gccArgs[@]} ) fi -whichComp=$(which $compiler) +whichComp=$(which "$compiler") if [[ -z "$whichComp" ]]; then echo "crossclang could not find compiler $compiler in path $PATH, giving up" >&2 exit 1 fi -clangDir=$(cd $(dirname "$whichComp"); pwd) +clangDir=$(dirname "$whichComp") +clangDir=$(cd "$clangDir"; pwd) if [ "$currentDir" == "$clangDir" ]; then echo "crossclang detected in PATH. Can't find real clang, giving up" >&2 exit 1 @@ -638,7 +640,7 @@ if [[ $gccMode -gt 0 ]]; then fi -compilerBinary="$(which $compiler)" +compilerBinary=$(which "$compiler") if [ -z "$compilerBinary" ]; then echo "Cannot compile -- compiler not found: $compiler" >&2 exit 1 From d4967a9a20b0489efe60afd01a92f1fb0de63573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 18:46:57 +0200 Subject: [PATCH 066/768] FileDescriptorCast: in/out/err descriptors may not be 0/1/2 On some systems, the numeric file descriptors for FileDescriptor.in, /out, /err do not follow the expected numbers 0/1/2 scheme. Adjust the documentation and tests to accommodate for that. --- .../newsclub/net/unix/FileDescriptorCast.java | 66 +++++++++++-------- .../net/unix/FileDescriptorCastTest.java | 11 ++-- 2 files changed, 47 insertions(+), 30 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java index e5b49b161..8153579b4 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java @@ -73,11 +73,6 @@ public final class FileDescriptorCast implements FileDescriptorAccess { private static final Map, CastingProviderMap> PRIMARY_TYPE_PROVIDERS_MAP = Collections .synchronizedMap(new HashMap<>()); - private final FileDescriptor fdObj; - - private int localPort = 0; - private int remotePort = 0; - private static final Function FD_IS_PROVIDER = System .getProperty("osv.version") != null ? LenientFileInputStream::new : FileInputStream::new; @@ -173,6 +168,15 @@ public Redirect provideAs(FileDescriptorCast fdc, Class desire } }; + private static final int FD_IN = getFdIfPossible(FileDescriptor.in); + private static final int FD_OUT = getFdIfPossible(FileDescriptor.out); + private static final int FD_ERR = getFdIfPossible(FileDescriptor.err); + + private final FileDescriptor fdObj; + + private int localPort = 0; + private int remotePort = 0; + private final CastingProviderMap cpm; private FileDescriptorCast(FileDescriptor fdObj, CastingProviderMap cpm) { @@ -180,6 +184,15 @@ private FileDescriptorCast(FileDescriptor fdObj, CastingProviderMap cpm) { this.cpm = Objects.requireNonNull(cpm); } + private static int getFdIfPossible(FileDescriptor fd) { + try { + return NativeUnixSocket.getFD(fd); + } catch (IOException e) { + e.printStackTrace(); + return -1; + } + } + private static void registerCastingProviders(Class primaryType, CastingProviderMap cpm) { Objects.requireNonNull(primaryType); CastingProviderMap prev; @@ -311,17 +324,15 @@ public static FileDescriptorCast using(FileDescriptor fdObj) throws IOException /** * Creates a {@link FileDescriptorCast} using the given native file descriptor value. *

- * This method - * is inherently unsafe as it may + * This method is inherently unsafe as it may *

    *
  1. make assumptions on the internal system representation of a file descriptor (which differs * between Windows and Unix, for example).
  2. *
  3. provide access to resources that are otherwise not accessible
  4. *
*

- * Note that the values {@code 0}, {@code 1}, and {@code 2} are always mapped to - * {@link FileDescriptor#in}, {@link FileDescriptor#out}, and {@link FileDescriptor#err}, - * respectively. + * Note that attempts are made to reuse {@link FileDescriptor#in}, {@link FileDescriptor#out}, and + * {@link FileDescriptor#err}, respectively. * * @param fd The system-native file descriptor value. * @return The {@link FileDescriptorCast} instance. @@ -334,25 +345,28 @@ public static FileDescriptorCast unsafeUsing(int fd) throws IOException { AFSocket.ensureUnsafeSupported(); FileDescriptor fdObj; + if (fd == -1) { + throw new IOException("Not a valid file descriptor"); + } else if (fd == FD_IN) { + fdObj = FileDescriptor.in; + } else if (fd == FD_OUT) { + fdObj = FileDescriptor.out; + } else if (fd == FD_ERR) { + fdObj = FileDescriptor.err; + } else { + fdObj = null; + } - switch (fd) { - case -1: - throw new IOException("Not a valid file descriptor"); - case 0: - fdObj = FileDescriptor.in; - break; - case 1: - fdObj = FileDescriptor.out; - break; - case 2: - fdObj = FileDescriptor.err; - break; - default: - fdObj = new FileDescriptor(); - NativeUnixSocket.initFD(fdObj, fd); - break; + if (fdObj != null) { + int check = getFdIfPossible(fdObj); + if (fd == check) { + return using(fdObj); + } } + fdObj = new FileDescriptor(); + NativeUnixSocket.initFD(fdObj, fd); + return using(fdObj); } diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java index 818bc2897..2651a124c 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java @@ -19,6 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively; @@ -98,9 +99,10 @@ public void testStdout() throws IOException { @Test public void testCastAsInteger() throws Exception { - assertEquals(0, FileDescriptorCast.using(FileDescriptor.in).as(Integer.class)); - assertEquals(1, FileDescriptorCast.using(FileDescriptor.out).as(Integer.class)); - assertEquals(2, FileDescriptorCast.using(FileDescriptor.err).as(Integer.class)); + assertNotEquals(-1, FileDescriptorCast.using(FileDescriptor.in).as(Integer.class)); + assertNotEquals(-1, FileDescriptorCast.using(FileDescriptor.out).as(Integer.class)); + assertNotEquals(-1, FileDescriptorCast.using(FileDescriptor.err).as(Integer.class)); + assertThrows(IOException.class, () -> FileDescriptorCast.using(new FileDescriptor()).as( Integer.class)); } @@ -110,7 +112,8 @@ public void testCastAsInteger() throws Exception { public void testUnsafeCast() throws Exception { assertEquals(1, FileDescriptorCast.unsafeUsing(1).as(Integer.class)); assertEquals(-2, FileDescriptorCast.unsafeUsing(-2).as(Integer.class)); - assertSame(FileDescriptor.out, FileDescriptorCast.unsafeUsing(1).as(FileDescriptor.class)); + assertSame(FileDescriptor.out, FileDescriptorCast.unsafeUsing(FileDescriptorCast.using( + FileDescriptor.out).as(Integer.class)).as(FileDescriptor.class)); assertThrows(IOException.class, () -> FileDescriptorCast.unsafeUsing(-1).as(Integer.class)); } From f8ed6d2469e531fd839897f63c4763002013a737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 18:49:45 +0200 Subject: [PATCH 067/768] native: attachCloseable may throw SocketException Not all FileDescriptor implementations allow attaching a Closeable; this may throw a SocketException that was previously not declared. --- .../java/org/newsclub/net/unix/AncillaryDataSupport.java | 8 +++++++- .../main/java/org/newsclub/net/unix/NativeUnixSocket.java | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java index e6c63764d..22e69d7e5 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java @@ -20,6 +20,7 @@ import java.io.Closeable; import java.io.FileDescriptor; import java.io.IOException; +import java.net.SocketException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; @@ -131,7 +132,12 @@ public void close() throws IOException { openReceivedFileDescriptors.remove(fdesc); } }; - NativeUnixSocket.attachCloseable(fdesc, cleanup); + + try { + NativeUnixSocket.attachCloseable(fdesc, cleanup); + } catch (SocketException e) { + // ignore (cannot attach) + } } this.receivedFileDescriptors.add(descriptors); diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java index b8d869dce..3bec13b4b 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java @@ -232,7 +232,8 @@ static native void initServerImpl(ServerSocket serverSocket, AFSocketImpl imp static native void copyFileDescriptor(FileDescriptor source, FileDescriptor target) throws IOException; - static native void attachCloseable(FileDescriptor fdsec, Closeable closeable); + static native void attachCloseable(FileDescriptor fdsec, Closeable closeable) + throws SocketException; static native int maxAddressLength(); From d7b3cfc505e354b95fcaf0d07fb660249551d04a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 18:51:33 +0200 Subject: [PATCH 068/768] Reformat code --- .../src/main/java/org/newsclub/net/unix/AFSocketAddress.java | 4 ++-- .../main/java/org/newsclub/net/unix/AFSocketCapability.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index 06647ef99..b7f36cd00 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -117,8 +117,8 @@ protected AFSocketAddress(int port, final byte[] socketAddress, ByteBuffer nativ * addresses can only be IPv4 or IPv6 (at least as of Java 16 and earlier). */ super(AFInetAddress.createUnresolvedHostname(socketAddress, af), 0); - this.nativeAddress = nativeAddress == null ? null : (ByteBuffer)(Object) nativeAddress.duplicate() - .rewind(); + this.nativeAddress = nativeAddress == null ? null : (ByteBuffer) (Object) nativeAddress + .duplicate().rewind(); if (port < -1) { throw new IllegalArgumentException("port out of range"); } diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java index 7c7497eb6..fe76b3364 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java @@ -124,7 +124,7 @@ public enum AFSocketCapability { * Support for "unsafe" operations. * * Trading-in safety for speed or simplicity may be justified sometimes. - * + * * @see Unsafe * @see AFSocket#ensureUnsafeSupported() */ From 7eb1edb07155cdee0f91ad3a8ec355c409ba4b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 18:52:43 +0200 Subject: [PATCH 069/768] AFSocketImpl: Constructor doesn't need to throw SocketException Remove "throws SocketException" from the constructor of AFSocketImpl and its subclasses. --- .../src/main/java/org/newsclub/net/unix/AFSocketImpl.java | 4 +--- .../src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java index 4341db5bc..f13867213 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java @@ -153,10 +153,8 @@ protected void unblockAccepts() { * * @param addressFamily The address family. * @param fdObj The socket's {@link FileDescriptor}. - * @throws SocketException on error. */ - protected AFSocketImpl(AFAddressFamily<@NonNull A> addressFamily, FileDescriptor fdObj) - throws SocketException { + protected AFSocketImpl(AFAddressFamily<@NonNull A> addressFamily, FileDescriptor fdObj) { super(); this.addressFamily = addressFamily; this.address = InetAddress.getLoopbackAddress(); diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java index 12ae2ac1d..9fc4a6b88 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java @@ -23,7 +23,7 @@ import java.net.SocketException; class AFUNIXSocketImpl extends AFSocketImpl { - protected AFUNIXSocketImpl(FileDescriptor fdObj) throws SocketException { + protected AFUNIXSocketImpl(FileDescriptor fdObj) { super(AFUNIXSocketAddress.AF_UNIX, fdObj); } diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java index 4528127d6..d976ccf94 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java @@ -24,7 +24,7 @@ import org.newsclub.net.unix.AFTIPCSocketAddress; final class AFTIPCSocketImpl extends AFSocketImpl { - protected AFTIPCSocketImpl(FileDescriptor fdObj) throws SocketException { + protected AFTIPCSocketImpl(FileDescriptor fdObj) { super(AFTIPCSelectorProvider.AF_TIPC, fdObj); } diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java index 5567caab0..deef0dd16 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java @@ -24,7 +24,7 @@ import org.newsclub.net.unix.AFVSOCKSocketAddress; final class AFVSOCKSocketImpl extends AFSocketImpl { - protected AFVSOCKSocketImpl(FileDescriptor fdObj) throws SocketException { + protected AFVSOCKSocketImpl(FileDescriptor fdObj) { super(AFVSOCKSelectorProvider.AF_VSOCK, fdObj); } From ab132dcccdbba99af26bf91b2a4918bc7e392605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 18:53:36 +0200 Subject: [PATCH 070/768] selftest: Don't rely on Service Provider logic to resolve TestEngine Let's hardcode the selftest junit test engine, so we can run tests in environments that don't support Java SPI via META-INF. --- .../org/newsclub/net/unix/selftest/SelftestExecutor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java index a25bc84f3..0a18b765d 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java @@ -29,6 +29,7 @@ import java.util.Optional; import java.util.stream.Collectors; +import org.junit.jupiter.engine.JupiterTestEngine; import org.junit.platform.console.options.Theme; import org.junit.platform.console.tasks.JuxPackageAccess; import org.junit.platform.engine.TestExecutionResult; @@ -39,6 +40,7 @@ import org.junit.platform.launcher.TestExecutionListener; import org.junit.platform.launcher.TestIdentifier; import org.junit.platform.launcher.TestPlan; +import org.junit.platform.launcher.core.LauncherConfig; import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder; import org.junit.platform.launcher.core.LauncherFactory; import org.junit.platform.launcher.listeners.SummaryGeneratingListener; @@ -63,7 +65,12 @@ class SelftestExecutor { TestExecutionSummary execute(ConsolePrintStream out0) throws Exception { PrintWriter out = new PrintWriter(new OutputStreamWriter(out0, Charset.defaultCharset())); try { - Launcher launcher = LauncherFactory.create(); + LauncherConfig launcherConfig = LauncherConfig.builder() // + .enableTestEngineAutoRegistration(false) // + .addTestEngines(new JupiterTestEngine()) // + .build(); + Launcher launcher = LauncherFactory.create(launcherConfig); + SummaryGeneratingListener summaryListener = new SummaryGeneratingListener(); launcher.registerTestExecutionListeners(summaryListener, JuxPackageAccess .newTreePrintingListener(out, true, Theme.ASCII)); From 4e1f56c3202554fb8b659d9c0d0e1f991e5e2cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 19:02:43 +0200 Subject: [PATCH 071/768] AFServerSocket: Reimplement all ServerSocket classes that call getImpl() While we may be able to override the "impl" in ServerSocket, this may be the case in all environments. We can override all methods and replace them with calls to getAFImpl() just fine, so let's do that. --- .../org/newsclub/net/unix/AFServerSocket.java | 121 +++++++++++++++++- 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java index d37213b79..a82b9353b 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java @@ -21,10 +21,15 @@ import java.io.File; import java.io.FileDescriptor; import java.io.IOException; +import java.net.InetAddress; import java.net.ServerSocket; import java.net.SocketAddress; import java.net.SocketException; +import java.net.SocketOption; +import java.net.SocketOptions; import java.nio.channels.IllegalBlockingModeException; +import java.util.Objects; +import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import org.eclipse.jdt.annotation.NonNull; @@ -38,6 +43,7 @@ * @param The concrete {@link AFSocketAddress} that is supported by this type. * @author Christian Kohlschütter */ +@SuppressWarnings("PMD.CyclomaticComplexity") public abstract class AFServerSocket extends ServerSocket implements FileDescriptorAccess { private final AFSocketImpl implementation; @@ -82,10 +88,11 @@ protected AFServerSocket() throws IOException { */ protected AFServerSocket(FileDescriptor fdObj) throws IOException { super(); + this.implementation = newImpl(fdObj); NativeUnixSocket.initServerImpl(this, implementation); - setReuseAddress(true); + getAFImpl().setOption(SocketOptions.SO_REUSEADDR, true); } /** @@ -486,6 +493,7 @@ public final void setDeleteOnClose(boolean b) { final AFSocketImpl getAFImpl() { if (created.compareAndSet(false, true)) { try { + getAFImpl().create(true); getSoTimeout(); // trigger create via java.net.Socket } catch (IOException e) { // ignore @@ -527,4 +535,115 @@ public final AFServerSocket bindHook(SocketAddressFilter hook) { this.bindFilter = hook; return this; } + + @Override + public void bind(SocketAddress endpoint) throws IOException { + bind(endpoint, 50); + } + + @Override + public InetAddress getInetAddress() { + if (!isBound()) { + return null; + } else { + return getAFImpl().getInetAddress(); + } + } + + @SuppressWarnings("all") + public T getOption(SocketOption name) throws IOException { + Objects.requireNonNull(name); + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + return getAFImpl().getOption(name); + } + + @Override + public synchronized void setReceiveBufferSize(int size) throws SocketException { + if (size <= 0) { + throw new IllegalArgumentException("receive buffer size must be a positive number"); + } + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + getAFImpl().setOption(SocketOptions.SO_RCVBUF, size); + } + + @Override + public synchronized int getReceiveBufferSize() throws SocketException { + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + int result = 0; + Object o = getAFImpl().getOption(SocketOptions.SO_RCVBUF); + if (o instanceof Integer) { + result = ((Integer) o).intValue(); + } + return result; + } + + @Override + public void setSoTimeout(int timeout) throws SocketException { + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + if (timeout < 0) { + throw new IllegalArgumentException("timeout < 0"); + } + getAFImpl().setOption(SocketOptions.SO_TIMEOUT, timeout); + } + + @Override + public int getSoTimeout() throws IOException { + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + Object o = getAFImpl().getOption(SocketOptions.SO_TIMEOUT); + /* extra type safety */ + if (o instanceof Integer) { + return ((Integer) o).intValue(); + } else { + return 0; + } + } + + @Override + public void setReuseAddress(boolean on) throws SocketException { + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + getAFImpl().setOption(SocketOptions.SO_REUSEADDR, Boolean.valueOf(on)); + } + + @Override + public boolean getReuseAddress() throws SocketException { + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + return ((Boolean) (getAFImpl().getOption(SocketOptions.SO_REUSEADDR))).booleanValue(); + } + + @Override + public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) { + } + + @SuppressWarnings("all") + public ServerSocket setOption(SocketOption name, T value) throws IOException { + Objects.requireNonNull(name); + if (isClosed()) { + throw new SocketException("Socket is closed"); + } + getAFImpl().setOption(name, value); + return this; + } + + @SuppressWarnings("all") + public Set> supportedOptions() { + return getAFImpl().supportedOptions(); + } + + // NOTE: We shall re-implement all methods defined in ServerSocket that internally call getImpl() + // and call getAFImpl() here. This is not strictly necessary for environments where we can + // override "impl"; however it's the right thing to do. } From bcce930b75a1c3fab11506d26d4f8d60ffc0763f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 19:09:13 +0200 Subject: [PATCH 072/768] native: Add code support for Android The Android Java SDK contains some changes that need to be addressed: - FileDescriptor int access is available via helper methods instead of a field - AbstractSelectableChannel: "removeKey" is called "deregister" - ServerSocket: We cannot override "impl" (unless "hidden_api_policy" is enabled). Moreover, we used to call CallObjectMethodA instead of CallVoidMethodA for a void method. Android's JNI is rightfully picky about this, so let's fix that as well. Lastly, improve error reporting for "handleFieldNotFound" by reporting the full classname, just just the simple name. --- .../src/main/c/filedescriptors.c | 28 +++++++++++++++++++ junixsocket-native/src/main/c/jniutil.c | 6 ++-- ...sclub_net_unix_android_SocketInputStream.h | 21 ++++++++++++++ ...club_net_unix_android_SocketOutputStream.h | 21 ++++++++++++++ junixsocket-native/src/main/c/reflection.c | 24 ++++++++++++++-- 5 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketInputStream.h create mode 100644 junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketOutputStream.h diff --git a/junixsocket-native/src/main/c/filedescriptors.c b/junixsocket-native/src/main/c/filedescriptors.c index 1a5ca92be..b22a815a9 100644 --- a/junixsocket-native/src/main/c/filedescriptors.c +++ b/junixsocket-native/src/main/c/filedescriptors.c @@ -24,7 +24,10 @@ #include "address.h" static jclass class_FileDescriptor = NULL; + static jfieldID fieldID_fd = NULL; +static jmethodID methodID_getFd = NULL; +static jmethodID methodID_setFd = NULL; #if defined(_WIN32) static jfieldID fieldID_handle = NULL; @@ -107,6 +110,20 @@ void init_filedescriptors(JNIEnv *env) { class_FileDescriptor = kFDTypeClasses[0]; fieldID_fd = (*env)->GetFieldID(env, class_FileDescriptor, "fd", "I"); + if (fieldID_fd == NULL) { + (*env)->ExceptionClear(env); + + // https://github.com/AndroidSDKSources/android-sdk-sources-for-api-level-33/blob/master/java/io/FileDescriptor.java + methodID_getFd = (*env)->GetMethodID(env, class_FileDescriptor, "getInt$", "()I"); + (*env)->ExceptionClear(env); + methodID_setFd = (*env)->GetMethodID(env, class_FileDescriptor, "setInt$", "(I)V"); + + if(methodID_getFd == NULL || methodID_setFd == NULL) { + (*env)->ExceptionClear(env); + fieldID_fd = (*env)->GetFieldID(env, class_FileDescriptor, "descriptor", "I"); + } + } + #if defined(_WIN32) fieldID_handle = (*env)->GetFieldID(env, class_FileDescriptor, "handle", "J"); #endif @@ -147,11 +164,22 @@ JNIEXPORT jint JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_getFD jint _getFD(JNIEnv * env, jobject fd) { + if(fieldID_fd == NULL && methodID_getFd != NULL) { + // Android + return (*env)->CallIntMethod(env, fd, methodID_getFd); + } + return (*env)->GetIntField(env, fd, fieldID_fd); } void _initFD(JNIEnv * env, jobject fd, jint handle) { + if(fieldID_fd == NULL && methodID_setFd != NULL) { + // Android + (*env)->CallVoidMethod(env, fd, methodID_setFd, handle); + return; + } + (*env)->SetIntField(env, fd, fieldID_fd, handle); } diff --git a/junixsocket-native/src/main/c/jniutil.c b/junixsocket-native/src/main/c/jniutil.c index e52a08135..8085e91af 100644 --- a/junixsocket-native/src/main/c/jniutil.c +++ b/junixsocket-native/src/main/c/jniutil.c @@ -23,6 +23,7 @@ void handleFieldNotFound(JNIEnv *env, jobject instance, char *fieldName) { + (*env)->ExceptionClear(env); jmethodID classMethodId = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, instance), "getClass", @@ -31,7 +32,7 @@ void handleFieldNotFound(JNIEnv *env, jobject instance, char *fieldName) classMethodId); jmethodID methodId = (*env)->GetMethodID(env, - (*env)->GetObjectClass(env, classObject), "getSimpleName", + (*env)->GetObjectClass(env, classObject), "getName", "()Ljava/lang/String;"); jstring className = (jstring)(*env)->CallObjectMethod(env, classObject, methodId); @@ -41,6 +42,7 @@ void handleFieldNotFound(JNIEnv *env, jobject instance, char *fieldName) } #define handleFieldNotFound_error_message_template "Cannot find '%s' in class %s" + size_t buflen = strlen(handleFieldNotFound_error_message_template) + strlen(fieldName) + strlen(classNameStr); char *message = calloc(1, buflen); CK_IGNORE_USED_BUT_MARKED_UNUSED_BEGIN @@ -68,7 +70,7 @@ void callObjectSetter(JNIEnv *env, jobject instance, char *methodName, } __attribute__((aligned(8))) jobject array[] = {value}; - (*env)->CallObjectMethodA(env, instance, methodId, (jvalue*)array); + (*env)->CallVoidMethodA(env, instance, methodId, (jvalue*)array); } void setObjectFieldValue(JNIEnv *env, jobject instance, char *fieldName, diff --git a/junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketInputStream.h b/junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketInputStream.h new file mode 100644 index 000000000..f1ae12049 --- /dev/null +++ b/junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketInputStream.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_newsclub_net_unix_android_SocketInputStream */ + +#ifndef _Included_org_newsclub_net_unix_android_SocketInputStream +#define _Included_org_newsclub_net_unix_android_SocketInputStream +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_newsclub_net_unix_android_SocketInputStream + * Method: socketRead0 + * Signature: (Ljava/io/FileDescriptor;[BIII)I + */ +JNIEXPORT jint JNICALL Java_org_newsclub_net_unix_android_SocketInputStream_socketRead0 + (JNIEnv *, jobject, jobject, jbyteArray, jint, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketOutputStream.h b/junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketOutputStream.h new file mode 100644 index 000000000..0fc60c877 --- /dev/null +++ b/junixsocket-native/src/main/c/org_newsclub_net_unix_android_SocketOutputStream.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_newsclub_net_unix_android_SocketOutputStream */ + +#ifndef _Included_org_newsclub_net_unix_android_SocketOutputStream +#define _Included_org_newsclub_net_unix_android_SocketOutputStream +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_newsclub_net_unix_android_SocketOutputStream + * Method: socketWrite0 + * Signature: (Ljava/io/FileDescriptor;[BII)V + */ +JNIEXPORT void JNICALL Java_org_newsclub_net_unix_android_SocketOutputStream_socketWrite0 + (JNIEnv *, jobject, jobject, jbyteArray, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/junixsocket-native/src/main/c/reflection.c b/junixsocket-native/src/main/c/reflection.c index dbc83d162..0c1c4d098 100644 --- a/junixsocket-native/src/main/c/reflection.c +++ b/junixsocket-native/src/main/c/reflection.c @@ -31,8 +31,18 @@ void init_reflection(JNIEnv *env) { kClassAbstractSelectableChannel = findClassAndGlobalRef(env, "java/nio/channels/spi/AbstractSelectableChannel"); if(kClassAbstractSelectableChannel) { kMethodRemoveKey = (*env)->GetMethodID(env, kClassAbstractSelectableChannel, "removeKey", "(Ljava/nio/channels/SelectionKey;)V"); + if(kMethodRemoveKey == NULL) { + (*env)->ExceptionClear(env); + + // https://android.googlesource.com/platform/libcore/+/cff1616/luni/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java + kMethodRemoveKey = (*env)->GetMethodID(env, kClassAbstractSelectableChannel, "deregister", "(Ljava/nio/channels/SelectionKey;)V"); + if(kMethodRemoveKey == NULL) { + (*env)->ExceptionClear(env); + } + } } } + void destroy_reflection(JNIEnv *env) { releaseClassGlobalRef(env, kClassAbstractSelectableChannel); } @@ -45,10 +55,20 @@ void destroy_reflection(JNIEnv *env) { JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_initServerImpl( JNIEnv * env, jclass clazz CK_UNUSED, jobject serverSocket, jobject impl) { + callObjectSetter(env, serverSocket, "", "(Ljava/net/SocketImpl;)V", impl); + if(!(*env)->ExceptionCheck(env)) { + // all done + return; + } + (*env)->ExceptionClear(env); + setObjectFieldValue(env, serverSocket, "impl", "Ljava/net/SocketImpl;", impl); - - if (doSetServerSocket) { + if((*env)->ExceptionCheck(env)) { + (*env)->ExceptionClear(env); + // cannot access impl (probably Android) + return; + } else if(doSetServerSocket) { // no longer present in Java 16 doSetServerSocket = setObjectFieldValueIfPossible(env, impl, "serverSocket", "Ljava/net/ServerSocket;", serverSocket); From 72110d050838fdce2384cc6aeb808451fd39583a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 15 Jun 2023 19:14:44 +0200 Subject: [PATCH 073/768] Update NOTICE year to 2023; reformat code --- NOTICE | 2 +- .../src/main/java/org/newsclub/net/unix/AFAddressFamily.java | 2 +- .../main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFCore.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFDatagramChannel.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFDatagramSocket.java | 2 +- .../main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFInetAddress.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFInputStream.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFOutputStream.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFPipe.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSelectionKey.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSelector.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSelectorProvider.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFServerSocket.java | 2 +- .../main/java/org/newsclub/net/unix/AFServerSocketChannel.java | 2 +- .../java/org/newsclub/net/unix/AFServerSocketConnector.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocket.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketAddress.java | 2 +- .../main/java/org/newsclub/net/unix/AFSocketAddressConfig.java | 2 +- .../java/org/newsclub/net/unix/AFSocketAddressFromHostname.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketCapability.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketChannel.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketConnector.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketCore.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketExtensions.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketFactory.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketImpl.java | 2 +- .../main/java/org/newsclub/net/unix/AFSocketImplExtensions.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketOption.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketPair.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketProtocol.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSocketType.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFSomeSocket.java | 2 +- .../main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java | 2 +- .../java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java | 2 +- .../java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java | 2 +- .../java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFUNIXSocket.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java | 2 +- .../java/org/newsclub/net/unix/AFUNIXSocketCredentials.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java | 2 +- .../main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java | 2 +- .../src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java | 2 +- .../main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java | 2 +- .../java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java | 2 +- .../newsclub/net/unix/AddressUnavailableSocketException.java | 2 +- .../main/java/org/newsclub/net/unix/AncillaryDataSupport.java | 2 +- .../java/org/newsclub/net/unix/BrokenPipeSocketException.java | 2 +- .../src/main/java/org/newsclub/net/unix/CleanableState.java | 2 +- .../src/main/java/org/newsclub/net/unix/CloseablePair.java | 2 +- .../src/main/java/org/newsclub/net/unix/Closeables.java | 2 +- .../main/java/org/newsclub/net/unix/DatagramSocketImplShim.java | 2 +- .../src/main/java/org/newsclub/net/unix/DatagramSocketShim.java | 2 +- .../main/java/org/newsclub/net/unix/FileDescriptorAccess.java | 2 +- .../src/main/java/org/newsclub/net/unix/FileDescriptorCast.java | 2 +- .../src/main/java/org/newsclub/net/unix/HostAndPort.java | 2 +- .../org/newsclub/net/unix/InvalidArgumentSocketException.java | 2 +- .../main/java/org/newsclub/net/unix/InvalidSocketException.java | 2 +- .../src/main/java/org/newsclub/net/unix/NamedInteger.java | 2 +- .../main/java/org/newsclub/net/unix/NamedIntegerBitmask.java | 2 +- .../main/java/org/newsclub/net/unix/NativeLibraryLoader.java | 2 +- .../src/main/java/org/newsclub/net/unix/NativeUnixSocket.java | 2 +- .../newsclub/net/unix/OperationNotSupportedSocketException.java | 2 +- .../src/main/java/org/newsclub/net/unix/RAFChannelProvider.java | 2 +- .../main/java/org/newsclub/net/unix/SentinelSocketAddress.java | 2 +- .../main/java/org/newsclub/net/unix/SocketAddressFilter.java | 2 +- .../main/java/org/newsclub/net/unix/SocketClosedException.java | 2 +- .../src/main/java/org/newsclub/net/unix/SocketImplShim.java | 2 +- .../main/java/org/newsclub/net/unix/SocketOptionsMapper.java | 2 +- .../src/main/java/org/newsclub/net/unix/Unsafe.java | 2 +- .../src/main/java8/org/newsclub/net/unix/AFInputStream.java | 2 +- .../src/main/java8/org/newsclub/net/unix/AFOutputStream.java | 2 +- .../src/main/java8/org/newsclub/net/unix/CleanableState.java | 2 +- .../java8/org/newsclub/net/unix/DatagramSocketImplShim.java | 2 +- .../main/java8/org/newsclub/net/unix/DatagramSocketShim.java | 2 +- .../src/main/java8/org/newsclub/net/unix/SocketImplShim.java | 2 +- .../src/test/java/org/newsclub/net/unix/AFDatagramUtil.java | 2 +- .../java/org/newsclub/net/unix/AFSocketCapabilityCondition.java | 2 +- .../org/newsclub/net/unix/AFSocketCapabilityRequirement.java | 2 +- .../java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java | 2 +- .../java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java | 2 +- .../java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/AddressSpecifics.java | 2 +- .../test/java/org/newsclub/net/unix/AncillaryMessageTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/AvailableTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/BufferOverflowTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/CancelAcceptTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/DatagramSocketTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/EndOfFileTest.java | 2 +- .../test/java/org/newsclub/net/unix/FileDescriptorCastTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/FinalizeTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/FinalizeTestClient.java | 2 +- .../src/test/java/org/newsclub/net/unix/ImplUtil.java | 2 +- .../src/test/java/org/newsclub/net/unix/InetAddressTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/PipeTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/ReadWriteTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/SelectorTest.java | 2 +- .../java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java | 2 +- .../src/test/java/org/newsclub/net/unix/SelftestProvider.java | 2 +- .../test/java/org/newsclub/net/unix/ServerSocketCloseTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/ServerSocketTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/SoTimeoutTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/SocketChannelTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/SocketOptionsTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/SocketPairTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/SocketTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/SocketTestBase.java | 2 +- .../java/org/newsclub/net/unix/StandardSocketOptionsTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/StdinSocketApp.java | 2 +- .../src/test/java/org/newsclub/net/unix/TcpNoDelayTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/ThroughputTest.java | 2 +- .../org/newsclub/net/unix/domain/AFUNIXAddressSpecifics.java | 2 +- .../org/newsclub/net/unix/domain/AbstractNamespaceTest.java | 2 +- .../java/org/newsclub/net/unix/domain/AcceptTimeoutTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/AvailableTest.java | 2 +- .../java/org/newsclub/net/unix/domain/BufferOverflowTest.java | 2 +- .../java/org/newsclub/net/unix/domain/CancelAcceptTest.java | 2 +- .../java/org/newsclub/net/unix/domain/DatagramSocketTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/EndOfFileTest.java | 2 +- .../org/newsclub/net/unix/domain/FileDescriptorCastTest.java | 2 +- .../java/org/newsclub/net/unix/domain/FileDescriptorsTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/FinalizeTest.java | 2 +- .../java/org/newsclub/net/unix/domain/PeerCredentialsTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/ReadWriteTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/SelectorTest.java | 2 +- .../org/newsclub/net/unix/domain/ServerSocketCloseTest.java | 2 +- .../java/org/newsclub/net/unix/domain/ServerSocketTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/SoTimeoutTest.java | 2 +- .../java/org/newsclub/net/unix/domain/SocketAddressTest.java | 2 +- .../java/org/newsclub/net/unix/domain/SocketChannelTest.java | 2 +- .../java/org/newsclub/net/unix/domain/SocketFactoryTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/SocketPairTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/domain/SocketTest.java | 2 +- .../org/newsclub/net/unix/domain/StandardSocketOptionsTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/TcpNoDelayTest.java | 2 +- .../test/java/org/newsclub/net/unix/domain/ThroughputTest.java | 2 +- .../test/java/org/newsclub/net/unix/java/AcceptTimeoutTest.java | 2 +- .../test/java/org/newsclub/net/unix/java/EndOfFileJavaTest.java | 2 +- .../java/org/newsclub/net/unix/java/JavaAddressSpecifics.java | 2 +- .../java/org/newsclub/net/unix/java/JavaInetStackCondition.java | 2 +- .../org/newsclub/net/unix/java/JavaInetStackRequirement.java | 2 +- .../src/test/java/org/newsclub/net/unix/java/SelectorTest.java | 2 +- .../test/java/org/newsclub/net/unix/java/ThroughputTest.java | 2 +- .../src/test/java8/org/newsclub/net/unix/FinalizeTest.java | 2 +- .../java8/org/newsclub/net/unix/StandardSocketOptionsTest.java | 2 +- .../test/java8/org/newsclub/net/unix/domain/FinalizeTest.java | 2 +- .../net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java | 2 +- .../src/main/java/org/newsclub/net/unix/demo/DemoHelper.java | 2 +- .../main/java/org/newsclub/net/unix/demo/SimpleTestClient.java | 2 +- .../main/java/org/newsclub/net/unix/demo/SimpleTestServer.java | 2 +- .../main/java/org/newsclub/net/unix/demo/client/DemoClient.java | 2 +- .../java/org/newsclub/net/unix/demo/client/DemoClientBase.java | 2 +- .../main/java/org/newsclub/net/unix/demo/client/ReadClient.java | 2 +- .../org/newsclub/net/unix/demo/client/ReadFileHandleClient.java | 2 +- .../java/org/newsclub/net/unix/demo/client/ReadWriteClient.java | 2 +- .../main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java | 2 +- .../newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java | 2 +- .../org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java | 2 +- .../org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java | 2 +- .../java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java | 2 +- .../java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java | 2 +- .../net/unix/demo/rmi/SimpleRMIClientActingAsServer.java | 2 +- .../java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java | 2 +- .../src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java | 2 +- .../java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java | 2 +- .../java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java | 2 +- .../org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java | 2 +- .../org/newsclub/net/unix/demo/rmi/services/HelloWorld.java | 2 +- .../org/newsclub/net/unix/demo/rmi/services/StreamService.java | 2 +- .../java/org/newsclub/net/unix/demo/rmi/services/World.java | 2 +- .../java/org/newsclub/net/unix/demo/server/ChargenServer.java | 2 +- .../java/org/newsclub/net/unix/demo/server/DemoServerBase.java | 2 +- .../main/java/org/newsclub/net/unix/demo/server/EchoServer.java | 2 +- .../main/java/org/newsclub/net/unix/demo/server/NullServer.java | 2 +- .../org/newsclub/net/unix/demo/server/SendFileHandleServer.java | 2 +- .../org/newsclub/net/unix/demo/server/SocketServerDemo.java | 2 +- .../main/java/org/newsclub/net/unix/demo/server/ZeroServer.java | 2 +- .../org/newsclub/net/unix/jetty/AFSocketClientConnector.java | 2 +- .../org/newsclub/net/unix/jetty/AFSocketServerConnector.java | 2 +- .../newsclub/net/unix/jetty/AFSocketServerConnectorTest.java | 2 +- .../org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java | 2 +- .../org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java | 2 +- .../java/org/newsclub/lib/junixsocket/common/NarMetadata.java | 2 +- .../java/org/newsclub/lib/junixsocket/custom/NarMetadata.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/AFNaming.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java | 2 +- .../java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java | 2 +- .../newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java | 2 +- .../newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java | 2 +- .../java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java | 2 +- .../java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java | 2 +- .../org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/RemoteFileOutput.java | 2 +- .../src/main/java/org/newsclub/net/unix/rmi/RemotePeerInfo.java | 2 +- .../main/java/org/newsclub/net/unix/rmi/ShutdownException.java | 2 +- .../java/org/newsclub/net/unix/rmi/ShutdownHookSupport.java | 2 +- .../org/newsclub/net/unix/rmi/AFSocketCapabilityCondition.java | 2 +- .../newsclub/net/unix/rmi/AFSocketCapabilityRequirement.java | 2 +- .../src/test/java/org/newsclub/net/unix/rmi/Hello.java | 2 +- .../src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java | 2 +- .../java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java | 2 +- .../org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java | 2 +- .../newsclub/net/unix/rmi/NaiveFileInputStreamRemoteImpl.java | 2 +- .../java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/rmi/RegistryTest.java | 2 +- .../java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java | 2 +- .../java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java | 2 +- .../org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java | 2 +- .../org/newsclub/net/unix/rmi/RemoteFileDescriptorTest.java | 2 +- .../test/java/org/newsclub/net/unix/rmi/RemoteRegistryTest.java | 2 +- .../test/java/org/newsclub/net/unix/rmi/SelftestProvider.java | 2 +- .../java/org/newsclub/net/unix/rmi/ShutdownHookTestBase.java | 2 +- .../src/test/java/org/newsclub/net/unix/rmi/TestBase.java | 2 +- .../test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java | 2 +- .../src/test/java/org/newsclub/net/unix/rmi/TestService.java | 2 +- .../test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java | 2 +- .../java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java | 2 +- .../java/org/newsclub/net/unix/selftest/nativeimage/Main.java | 2 +- .../newsclub/net/unix/selftest/nativeimage/TriggerSelftest.java | 2 +- .../org/newsclub/net/unix/selftest/SelftestProvider.java | 2 +- .../src/main/java/org/newsclub/net/unix/selftest/Selftest.java | 2 +- .../java/org/newsclub/net/unix/selftest/SelftestExecutor.java | 2 +- .../java/org/newsclub/net/unix/selftest/SelftestProvider.java | 2 +- .../main/java/org/newsclub/net/unix/selftest/SelftestTest.java | 2 +- .../java/org/newsclub/net/unix/selftest/apps/EchoServer.java | 2 +- .../org/newsclub/net/unix/selftest/apps/SocketAddressUtil.java | 2 +- .../java/org/newsclub/net/unix/selftest/apps/StreamClient.java | 2 +- .../java/org/newsclub/net/unix/selftest/apps/ZeroServer.java | 2 +- .../main/java/org/newsclub/net/unix/server/AFSocketServer.java | 2 +- .../java/org/newsclub/net/unix/server/AFUNIXSocketServer.java | 2 +- .../main/java/org/newsclub/net/unix/server/SocketServer.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCDatagramChannel.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java | 2 +- .../org/newsclub/net/unix/tipc/AFTIPCDatagramSocketImpl.java | 2 +- .../main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java | 2 +- .../src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java | 2 +- .../org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java | 2 +- .../src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java | 2 +- .../main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java | 2 +- .../main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java | 2 +- .../org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java | 2 +- .../java/org/newsclub/net/unix/tipc/AFTIPCAddressSpecifics.java | 2 +- .../org/newsclub/net/unix/tipc/AFTIPCTopologyWatcherTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/AcceptTimeoutTest.java | 2 +- .../java/org/newsclub/net/unix/tipc/AncillaryMessageTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/tipc/AvailableTest.java | 2 +- .../java/org/newsclub/net/unix/tipc/BufferOverflowTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/CancelAcceptTest.java | 2 +- .../java/org/newsclub/net/unix/tipc/DatagramSocketTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/tipc/EndOfFileTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/tipc/FinalizeTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/tipc/ReadWriteTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/tipc/SelectorTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/SelftestProvider.java | 2 +- .../java/org/newsclub/net/unix/tipc/ServerSocketCloseTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/ServerSocketTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/tipc/SoTimeoutTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/SocketChannelTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/SocketPairTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/tipc/SocketTest.java | 2 +- .../org/newsclub/net/unix/tipc/StandardSocketOptionsTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/TcpNoDelayTest.java | 2 +- .../test/java/org/newsclub/net/unix/tipc/ThroughputTest.java | 2 +- .../java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java | 2 +- .../org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java | 2 +- .../org/newsclub/net/unix/vsock/AFVSOCKDatagramSocketImpl.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java | 2 +- .../net/unix/vsock/AFVSOCKProxyServerSocketConnector.java | 2 +- .../newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java | 2 +- .../org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java | 2 +- .../org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java | 2 +- .../main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java | 2 +- .../org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java | 2 +- .../org/newsclub/net/unix/vsock/AFVSOCKAddressSpecifics.java | 2 +- .../java/org/newsclub/net/unix/vsock/AFVSOCKExtensionsTest.java | 2 +- .../java/org/newsclub/net/unix/vsock/AcceptTimeoutTest.java | 2 +- .../java/org/newsclub/net/unix/vsock/AncillaryMessageTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/AvailableTest.java | 2 +- .../java/org/newsclub/net/unix/vsock/BufferOverflowTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/CancelAcceptTest.java | 2 +- .../java/org/newsclub/net/unix/vsock/DatagramSocketTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/EndOfFileTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/vsock/FinalizeTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/ReadWriteTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/vsock/SelectorTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/SelftestProvider.java | 2 +- .../java/org/newsclub/net/unix/vsock/ServerSocketCloseTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/ServerSocketTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/SoTimeoutTest.java | 2 +- .../java/org/newsclub/net/unix/vsock/SocketChannelTest.java | 2 +- .../java/org/newsclub/net/unix/vsock/SocketOptionsTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/SocketPairTest.java | 2 +- .../src/test/java/org/newsclub/net/unix/vsock/SocketTest.java | 2 +- .../org/newsclub/net/unix/vsock/StandardSocketOptionsTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/TcpNoDelayTest.java | 2 +- .../test/java/org/newsclub/net/unix/vsock/ThroughputTest.java | 2 +- 335 files changed, 335 insertions(+), 335 deletions(-) diff --git a/NOTICE b/NOTICE index b9b917486..cfae8c6e7 100644 --- a/NOTICE +++ b/NOTICE @@ -1,6 +1,6 @@ junixsocket -Copyright 2009-2022 Christian Kohlschütter +Copyright 2009-2023 Christian Kohlschütter Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java index 40340849d..ae142eb9a 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamily.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java index 24ee4a9e7..89bf97128 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFAddressFamilyConfig.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java index 84b9ac3bb..218335aa7 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFCore.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java index fec4b01c6..ac9cdba38 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java index 3cb0fa216..087356116 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java index 13b17cd41..46fb4d2df 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFDatagramSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java index b7ab0b5c7..2267f25f6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInetAddress.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java index fc36095ff..56dd45d0a 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFInputStream.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java index b91a7e31e..9764aeae1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFOutputStream.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java index ef1ca6ed7..1f2e06e98 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFPipe.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectionKey.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectionKey.java index a70352a4f..56e977579 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectionKey.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectionKey.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelector.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelector.java index fa4c56040..3eefbe1c6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelector.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelector.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java index efc3bc688..fd1837730 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSelectorProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java index a82b9353b..f0c3164e8 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java index cd774e15b..04b4e61bd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java index a8558dd06..7f669cb7d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFServerSocketConnector.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java index 299c430bb..d97a78bde 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index b7f36cd00..0b2827f54 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java index 84aaea7b7..f37f1da4a 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressConfig.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java index 7f6c4643d..7c006b22e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddressFromHostname.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java index fe76b3364..9b8d9a268 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java index 65156f791..2a639ca3d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java index ca3482c6e..86d2725f3 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketConnector.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java index f19e182d1..998062d49 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCore.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java index 15cb47679..e68a1f633 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketExtensions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java index 20a9c128d..b7228ea6c 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java index f13867213..dd77be398 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java index 966ac3b7a..c855baa41 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketImplExtensions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java index 670afdff6..dda7004f5 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketOption.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java index c0bffd68a..b5eb3a6fd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketPair.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java index b458ed60b..e816bc1eb 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketProtocol.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java index 158ceb24c..a62768778 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketType.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java index 08d98c5d1..1cfc23eb6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSomeSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java index 8d85652bc..bca906c29 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketAddress.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java index 7f9fd9fdc..98e4eab92 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java index 459be3762..e9bece9db 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java index 2381f65e0..fc363a7c2 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java index 4afca7d5c..cc3a70337 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java index 81351ebd5..9b6074a82 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java index 7ca8582e0..3634a9177 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java index b6b3c0909..b30abaa81 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java index 527515213..77d8a7ab1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java index 91f06e01e..6c87662f8 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java index 4d1aa3493..fe4b211cf 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java index 5caeb6ced..4cbf992e6 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java index 18d61f827..8a14096c5 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java index 9f0787ca3..575b57f69 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java index 3479ec8af..0045f7297 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java index 39938295d..46b3e18bd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java index 9fc4a6b88..da2ac7d9b 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java index 68413018d..54aef8ccc 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java index 9929ba485..6eaa063ee 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java index 57a597f94..2e985958e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java index 9d3faa2a6..06db22615 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java index 22e69d7e5..35f19563b 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java index 91969d10c..1d9e423a1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java index de7e8d68f..b3db5d71f 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java index cbaedc1f4..ab86a5dbb 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java index 5f70cc0f1..b19309efd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java index 7cbda33eb..1ea0a9f69 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java index 5c860815d..f9619357d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java index 0298c35b3..dbad4ae08 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java index 8153579b4..2d1047c91 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java index 5f8fb4921..01e21991d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java index 6860dbf8a..6123bb27d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java index b4381ca18..675c9d39d 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java index aca83ba73..29d994398 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java index 995ee41bf..e436bbea5 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java index d34af59fd..397d0192f 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java index 3bec13b4b..76ca35a3e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java index 4aa38a2e9..87e9e8c5e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java index 34c51cf57..09a80affc 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java index 7d0d6e91a..859643eff 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java index 6d469035c..b166cd8b7 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java index f701c2c0c..e882a5d5a 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java index ec176ffdd..709827206 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java index 07e701ef1..99a5033e1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java index 72e9458be..0859e2dcb 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java index 0cc123f10..45fa0a98b 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFInputStream.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java index cd7e4e703..289452a1b 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/AFOutputStream.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java index c98a3ecc1..53ab85fe6 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/CleanableState.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java index b0353223a..905177938 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketImplShim.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java index e25c52f08..4b6632946 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/DatagramSocketShim.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java b/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java index ff6f22f1f..0f10eccae 100644 --- a/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java +++ b/junixsocket-common/src/main/java8/org/newsclub/net/unix/SocketImplShim.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java index 92674fadd..7bf837b2d 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFDatagramUtil.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java index 35cfe9e77..ec70b49c2 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityCondition.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityRequirement.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityRequirement.java index c6c37d7d7..d456dbd7d 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityRequirement.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFSocketCapabilityRequirement.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java index b497db5c7..4eb10364a 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFTIPCSocketAddressTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java index 10da05844..e19eca244 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFUNIXSocketAddressTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java index f18103ece..fec01767b 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AFVSOCKSocketAddressTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java index 4353a4879..a57dfcdae 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java index 0f5f62db5..b8cb2f45f 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AddressSpecifics.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AncillaryMessageTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AncillaryMessageTest.java index 619066b12..f964ea1df 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AncillaryMessageTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AncillaryMessageTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/AvailableTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/AvailableTest.java index f954cc65f..ea568e16b 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/AvailableTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/AvailableTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/BufferOverflowTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/BufferOverflowTest.java index 467c63a13..3b2303274 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/BufferOverflowTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/BufferOverflowTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java index 0e9fbceac..4a1c96e07 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/DatagramSocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/DatagramSocketTest.java index 5980c1bad..38c3c29d0 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/DatagramSocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/DatagramSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java index 5c6d5f7cc..7286e77d9 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java index 2651a124c..c5907cf1d 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java index 020a1dd2c..287069239 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java index 10db902c0..4222414e5 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ImplUtil.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ImplUtil.java index ce2a174d2..78fbb449f 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ImplUtil.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ImplUtil.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/InetAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/InetAddressTest.java index b753fbb5c..29d60f9fe 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/InetAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/InetAddressTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java index e88557a9f..9bfe058c8 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/PipeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java index db2b9fdae..58b71c740 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ReadWriteTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java index 0980f88f0..f7101a0df 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelectorTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java index 836cb2c25..19f56dada 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestDiagnosticsHelper.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java index b47a2d67e..277f95d37 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java index d5b48bf7d..b6063eda6 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java index 049778ec3..468c9b506 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java index b4bd59c33..ce02412a2 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SoTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java index 822c10af9..af185a9e4 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketChannelTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketOptionsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketOptionsTest.java index 43432f20f..5f878bb15 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketOptionsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketPairTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketPairTest.java index d798c6006..b154ab140 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketPairTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketPairTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java index 12fb61fe8..80fd0099f 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java index 7e4b1af8d..ffc60506e 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SocketTestBase.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java index bd97bae9d..716fa2d2b 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/StandardSocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java index 85cb7f9ba..03227a6c1 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/StdinSocketApp.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/TcpNoDelayTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/TcpNoDelayTest.java index d11dcfc5e..62fccfd8c 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/TcpNoDelayTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/TcpNoDelayTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java index f670046f7..732da92eb 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AFUNIXAddressSpecifics.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AFUNIXAddressSpecifics.java index 29b1e9993..c10b2554a 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AFUNIXAddressSpecifics.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AFUNIXAddressSpecifics.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AbstractNamespaceTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AbstractNamespaceTest.java index 151ba5215..63840c6eb 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AbstractNamespaceTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AbstractNamespaceTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AcceptTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AcceptTimeoutTest.java index 4fdae4da7..c0a3167f6 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AcceptTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AcceptTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AvailableTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AvailableTest.java index ca0212895..660edb6f6 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AvailableTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AvailableTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/BufferOverflowTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/BufferOverflowTest.java index 2b57aa390..97b915c2c 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/BufferOverflowTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/BufferOverflowTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/CancelAcceptTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/CancelAcceptTest.java index 9d2dad683..503cb3bcb 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/CancelAcceptTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/CancelAcceptTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/DatagramSocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/DatagramSocketTest.java index 7d7a83002..164921f38 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/DatagramSocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/DatagramSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/EndOfFileTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/EndOfFileTest.java index cc98adb62..d6f9191e9 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/EndOfFileTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/EndOfFileTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java index f684b0c72..4dde690c5 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorCastTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java index 3bd415073..4d4b36245 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FileDescriptorsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FinalizeTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FinalizeTest.java index 9c910db6f..0441a88d5 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FinalizeTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/FinalizeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java index 3bd8effc0..918c3ef1c 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/PeerCredentialsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ReadWriteTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ReadWriteTest.java index a39bebb67..ba8566118 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ReadWriteTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ReadWriteTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SelectorTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SelectorTest.java index 3c7352bd2..092fb0486 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SelectorTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SelectorTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketCloseTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketCloseTest.java index bbd62c133..e3e77e8f1 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketCloseTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketCloseTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketTest.java index b9c191fa2..7b7df5e34 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ServerSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SoTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SoTimeoutTest.java index 35b663d37..6f1c186b5 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SoTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SoTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java index 62af20e6b..d144f8e89 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketChannelTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketChannelTest.java index a5aa7152c..6c08842d6 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketChannelTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketChannelTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java index 58ce2e67b..0b61c8b75 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketFactoryTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketPairTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketPairTest.java index 06d5be29c..c2b8bc234 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketPairTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketPairTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java index ef68247df..e656117cf 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/StandardSocketOptionsTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/StandardSocketOptionsTest.java index c50e667c3..aa95e933e 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/StandardSocketOptionsTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/StandardSocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/TcpNoDelayTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/TcpNoDelayTest.java index 1fef1a952..c46d7b408 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/TcpNoDelayTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/TcpNoDelayTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ThroughputTest.java index 30fdf9027..6de60631a 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/ThroughputTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/AcceptTimeoutTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/AcceptTimeoutTest.java index 3b84ffc43..70bdedd61 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/AcceptTimeoutTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/AcceptTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/EndOfFileJavaTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/EndOfFileJavaTest.java index 470a462e3..47b11a9f4 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/EndOfFileJavaTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/EndOfFileJavaTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaAddressSpecifics.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaAddressSpecifics.java index 5fb8def66..c004f3932 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaAddressSpecifics.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaAddressSpecifics.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackCondition.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackCondition.java index 892b6ecde..3db4d8005 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackCondition.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackCondition.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java index 813d7a833..3d79ee5aa 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/JavaInetStackRequirement.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/SelectorTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/SelectorTest.java index 2186a9653..4301e74ef 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/SelectorTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/SelectorTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/ThroughputTest.java index cd35763dc..a536c28c4 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/java/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/java/ThroughputTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java b/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java index 3d67dc0ee..b735cc757 100644 --- a/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java +++ b/junixsocket-common/src/test/java8/org/newsclub/net/unix/FinalizeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java b/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java index 5eba7394f..785e59fab 100644 --- a/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java +++ b/junixsocket-common/src/test/java8/org/newsclub/net/unix/StandardSocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-common/src/test/java8/org/newsclub/net/unix/domain/FinalizeTest.java b/junixsocket-common/src/test/java8/org/newsclub/net/unix/domain/FinalizeTest.java index a070d3d8f..471222884 100644 --- a/junixsocket-common/src/test/java8/org/newsclub/net/unix/domain/FinalizeTest.java +++ b/junixsocket-common/src/test/java8/org/newsclub/net/unix/domain/FinalizeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java index 68a5b7ee7..88cb064a7 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/mysql/demo/AFUNIXDatabaseSocketFactoryDemo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java index e79c727c1..abc9502f9 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/DemoHelper.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java index 2502e871e..b40c58c29 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java index dc32ad83a..754c02a8b 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/SimpleTestServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java index e9d8e29e2..7b4b6b2b6 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java index 661e345b0..07c86f2f4 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/DemoClientBase.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadClient.java index b5886ba52..6b9e6db37 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadFileHandleClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadFileHandleClient.java index a4a113adb..951e93bbb 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadFileHandleClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadFileHandleClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadWriteClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadWriteClient.java index cb71c581f..172e87ca8 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadWriteClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/client/ReadWriteClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java index f889e90d2..4f7fe3536 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/jdbc/PostgresDemo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java index c4bb840e2..fd4bf162b 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/nanohttpd/NanoHttpdServerDemo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java index 8f20d0b3c..102c17284 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java index 2d7dd1be3..9f4423fcb 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java index b12a15b26..03b7a78b3 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java index 7ed02962d..abc790c85 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java index 190ee6586..1aa51eab8 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java index 95e25c485..fea30e84b 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java index 664a4ee7c..170356e83 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java index eab1c77e2..33c216c18 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java index 6df8d18f5..1e94fe74f 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java index 77e5bf6ed..a00fb9cc2 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java index b5989bd4a..1848f77e4 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java index 1b3d37950..90c01ae67 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java index 285bd5619..2cec6cd21 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java index e49e05bb3..ec8423b84 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java index ba857f15a..ee9e5736d 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java index 6429501fb..28bd499fc 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java index 5ec4bc325..0ce8a9ef3 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java index e7b3fdf29..aabec0409 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java index 0fba2b422..fddf11534 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java index 7a8a26879..32c38a861 100644 --- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java +++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java index 34d3a81fa..6e7b26b73 100644 --- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java +++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java index 96342b14e..c3c8cbeef 100644 --- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java +++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java b/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java index 7f281526f..30cde6070 100644 --- a/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java +++ b/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java index 03b4c7160..19a725c14 100644 --- a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java +++ b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java index e378ccb41..95ad4f72d 100644 --- a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java +++ b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java index 57e0ad2e3..0e6e60205 100644 --- a/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java +++ b/junixsocket-native-common/src/main/java/org/newsclub/lib/junixsocket/common/NarMetadata.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java index 6ef4dc068..90c999be0 100644 --- a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java +++ b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java index 5ee6f7e7c..aeba29557 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNaming.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java index 49820365b..8d24a4471 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java index f9193f10e..276991eeb 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFNamingRef.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java index b70b0bdd0..6b654ec29 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIService.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java index 727aa7450..f995bb889 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMIServiceImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java index 8dc0cc49b..a26c55b60 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRMISocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java index 8ef24ff23..7d69de5c3 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistry.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java index 050113ca8..80a428805 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFRegistryAccess.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java index 928b8e4ab..0288b6695 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXNaming.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java index e054e8655..85032e707 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRMISocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java index f03defa1f..ebac7dc66 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/AFUNIXRegistry.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java index 30377e75b..a66a456ff 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIClientSocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java index db18690e6..5278d6ca4 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/DefaultRMIServerSocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java index e0abe2730..bf6415b6e 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RMIPorts.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java index 960ab1b6f..7f8004fa9 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseable.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java index 5ffac4472..57df1bc34 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteCloseableImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java index 7cc2e1e30..e3b9a78d5 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptor.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java index 86a2e9fc4..222ee8afb 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorBase.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java index 1042687b3..e6388977e 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileInput.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileOutput.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileOutput.java index dab0def05..af0759483 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileOutput.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemoteFileOutput.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemotePeerInfo.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemotePeerInfo.java index 0ab724e1e..ccf8ccb4c 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemotePeerInfo.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/RemotePeerInfo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownException.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownException.java index 0d0e54ca6..85506666d 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownException.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownException.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownHookSupport.java b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownHookSupport.java index f4c4bdb40..321b8a47e 100644 --- a/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownHookSupport.java +++ b/junixsocket-rmi/src/main/java/org/newsclub/net/unix/rmi/ShutdownHookSupport.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityCondition.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityCondition.java index 92d875e16..8777e0c98 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityCondition.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityCondition.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityRequirement.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityRequirement.java index 7ba3a0c30..70af5f39e 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityRequirement.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/AFSocketCapabilityRequirement.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java index 2af28e5fc..2588a4f5e 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/Hello.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java index 9d4b4e5f4..38b13b1d1 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/HelloImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java index 77d489c8e..aedc8361e 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/JunixsocketVersionTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java index 67bde461a..e71cbf376 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemote.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemoteImpl.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemoteImpl.java index 36090a9db..4da892334 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemoteImpl.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/NaiveFileInputStreamRemoteImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java index 747dbb320..89e562806 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RMIPeerCredentialsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RegistryTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RegistryTest.java index bbc00fc73..4d4891eaf 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RegistryTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RegistryTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java index 0d520b667..552918308 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java index a5322e0ea..c95d6dd83 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThing.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java index 68b6b1097..c5d1885ff 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteCloseableThingImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorTest.java index 8cc8b3ffb..aafc164a7 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteFileDescriptorTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteRegistryTest.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteRegistryTest.java index f6b47ef64..36006bdbd 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteRegistryTest.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/RemoteRegistryTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java index 46225cc2a..ffb9330c1 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/ShutdownHookTestBase.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/ShutdownHookTestBase.java index a8a29993d..1655dd0e8 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/ShutdownHookTestBase.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/ShutdownHookTestBase.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestBase.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestBase.java index 367e2f9d3..e5419a03c 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestBase.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestBase.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java index 498ebcf12..9ca8802cb 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestRegistryServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java index 7646219ac..4e47c0328 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestService.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java index c17c994b2..cb6e46647 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/TestServiceImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java b/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java index f01d1fb2d..e2d1e0cd2 100644 --- a/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java +++ b/junixsocket-rmi/src/test/java8/org/newsclub/net/unix/rmi/RemoteRegistryTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java b/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java index c7a83ef49..34bd94d09 100644 --- a/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java +++ b/junixsocket-selftest-native-image/src/main/java/org/newsclub/net/unix/selftest/nativeimage/Main.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest-native-image/src/test/java/org/newsclub/net/unix/selftest/nativeimage/TriggerSelftest.java b/junixsocket-selftest-native-image/src/test/java/org/newsclub/net/unix/selftest/nativeimage/TriggerSelftest.java index bb6a9188e..88048a462 100644 --- a/junixsocket-selftest-native-image/src/test/java/org/newsclub/net/unix/selftest/nativeimage/TriggerSelftest.java +++ b/junixsocket-selftest-native-image/src/test/java/org/newsclub/net/unix/selftest/nativeimage/TriggerSelftest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java index 5aeedf52b..994a41687 100644 --- a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java +++ b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java index 4460db375..c58d97e1c 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java index 0a18b765d..9336ec5a9 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestExecutor.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java index e4f385008..0bd7b5357 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestTest.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestTest.java index 5b8936ac6..d12bef8e9 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestTest.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/EchoServer.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/EchoServer.java index 0e55c46db..839e1858a 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/EchoServer.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/EchoServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/SocketAddressUtil.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/SocketAddressUtil.java index a5ea74db5..ded527512 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/SocketAddressUtil.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/SocketAddressUtil.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/StreamClient.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/StreamClient.java index 92bdb9036..472e0b505 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/StreamClient.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/StreamClient.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/ZeroServer.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/ZeroServer.java index 734e13b5f..ae1e3a317 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/ZeroServer.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/apps/ZeroServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java index 403445335..13d520fa1 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFSocketServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java index edaca98fd..1c953a4b1 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/AFUNIXSocketServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java index 4479af73a..bd0845b47 100644 --- a/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java +++ b/junixsocket-server/src/main/java/org/newsclub/net/unix/server/SocketServer.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramChannel.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramChannel.java index b940f9a8f..51701e8e1 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramChannel.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java index 728faf03a..8ffa6c5d1 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocketImpl.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocketImpl.java index ce52c84ce..45a7c5eed 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocketImpl.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDatagramSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java index 50e21ce19..675d70027 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCDestName.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java index 3a83fe98d..0bdc35ea2 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCErrInfo.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java index dbc4f1eac..03e7da3aa 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCGroupRequest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java index 6251e3248..60b7756a4 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCProtocolFamily.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java index e8d92b6b6..e3620b014 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSelectorProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java index d95ebe193..500ea73e4 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java index 42527b4ad..fc2f04279 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCServerSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java index 8c1bcbd12..3927f92cb 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java index 70c1cea39..2c166dafe 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java index cfe0fecea..ff68809e7 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketExtensions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java index a275173ef..074467986 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java index d976ccf94..fc33b565b 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java index 305b379ba..6d5789a10 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketOptions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java index 970abd2a8..b7abff7ff 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCSocketPair.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java index 6031860f0..9df62433d 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyEvent.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java index 4f3b401f3..d90aa8f6b 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologySubscription.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java index 9112dc3c3..d0d3b3133 100644 --- a/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java +++ b/junixsocket-tipc/src/main/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcher.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCAddressSpecifics.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCAddressSpecifics.java index fe10c3826..9846fde09 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCAddressSpecifics.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCAddressSpecifics.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcherTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcherTest.java index 2bc1e07a8..5a2f323ea 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcherTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AFTIPCTopologyWatcherTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AcceptTimeoutTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AcceptTimeoutTest.java index fd4f69cf3..994d9496a 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AcceptTimeoutTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AcceptTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AncillaryMessageTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AncillaryMessageTest.java index ed315b408..2e8af6d59 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AncillaryMessageTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AncillaryMessageTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AvailableTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AvailableTest.java index f4dccf95f..3e5b84640 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AvailableTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/AvailableTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/BufferOverflowTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/BufferOverflowTest.java index 02f35d04e..b508d2f37 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/BufferOverflowTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/BufferOverflowTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/CancelAcceptTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/CancelAcceptTest.java index e7ff37480..04e5743b5 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/CancelAcceptTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/CancelAcceptTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/DatagramSocketTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/DatagramSocketTest.java index faf248cb2..b02d45c50 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/DatagramSocketTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/DatagramSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/EndOfFileTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/EndOfFileTest.java index 2f9dc24e3..6cae0cf5a 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/EndOfFileTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/EndOfFileTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/FinalizeTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/FinalizeTest.java index bffc962f1..f0e268afe 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/FinalizeTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/FinalizeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ReadWriteTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ReadWriteTest.java index 273bc897e..03851264c 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ReadWriteTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ReadWriteTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelectorTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelectorTest.java index 9215dd628..2b1eced7d 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelectorTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelectorTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java index ec33e33b3..e305d936a 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketCloseTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketCloseTest.java index 3ccc6f2bc..26244eb5b 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketCloseTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketCloseTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketTest.java index 3c0e9fda2..89d54df79 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ServerSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SoTimeoutTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SoTimeoutTest.java index 60f0020a3..52a663400 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SoTimeoutTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SoTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketChannelTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketChannelTest.java index 5f33c2e0b..0cc210443 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketChannelTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketChannelTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java index 0e5a15134..0e2acc91e 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketPairTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketPairTest.java index 145c5e3d1..c631300a0 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketPairTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketPairTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java index e1af5a6a0..be3ad725d 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/StandardSocketOptionsTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/StandardSocketOptionsTest.java index 14a14a339..84ca8f3ee 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/StandardSocketOptionsTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/StandardSocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/TcpNoDelayTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/TcpNoDelayTest.java index 2d33f3068..42ec8f850 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/TcpNoDelayTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/TcpNoDelayTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ThroughputTest.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ThroughputTest.java index 468932fd0..2a3eef76e 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ThroughputTest.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/ThroughputTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java b/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java index 6de9f6a77..92977a74d 100644 --- a/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java +++ b/junixsocket-tipc/src/test/java8/org/newsclub/net/unix/tipc/SocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java index 9d5f184d1..94ace6c26 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java index 2a6ad14cb..a1a8e51b9 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocketImpl.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocketImpl.java index a7c9694f2..a8c1ba7ff 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocketImpl.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKDatagramSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java index 75aa8181e..19d5016e7 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProtocolFamily.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java index 8e5672be0..1266ec7c9 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxyServerSocketConnector.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java index 6ab6be9d4..7e5478f54 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKProxySocketConnector.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java index 6fb5a877e..ac6eb32e9 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSelectorProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java index defd2da03..004929f31 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java index 3add33358..1d5ca4012 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKServerSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java index 6bf4b4f27..e15dfb33e 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocket.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java index d967b5f3f..8e818bf5d 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketChannel.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java index 5a823a146..0777b9891 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketExtensions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java index 38a3055b7..72a94cb65 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketFactory.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java index deef0dd16..f8b72b8c0 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketImpl.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java index e619c1ac7..0f9427442 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketOptions.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java index 87cbbb79d..9fc005c7f 100644 --- a/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java +++ b/junixsocket-vsock/src/main/java/org/newsclub/net/unix/vsock/AFVSOCKSocketPair.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKAddressSpecifics.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKAddressSpecifics.java index dfa24c203..9d5e931ae 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKAddressSpecifics.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKAddressSpecifics.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKExtensionsTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKExtensionsTest.java index 47dc4b13f..80c1da3d0 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKExtensionsTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AFVSOCKExtensionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AcceptTimeoutTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AcceptTimeoutTest.java index cbf354154..76618fe49 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AcceptTimeoutTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AcceptTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AncillaryMessageTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AncillaryMessageTest.java index 1c9a317c0..1aabec3a9 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AncillaryMessageTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AncillaryMessageTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AvailableTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AvailableTest.java index 019d3fac6..45c2ee8c3 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AvailableTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/AvailableTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/BufferOverflowTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/BufferOverflowTest.java index 120abbed2..847574684 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/BufferOverflowTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/BufferOverflowTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/CancelAcceptTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/CancelAcceptTest.java index 2f5e5a873..e925bea2d 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/CancelAcceptTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/CancelAcceptTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/DatagramSocketTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/DatagramSocketTest.java index 966ed6925..979a808ad 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/DatagramSocketTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/DatagramSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/EndOfFileTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/EndOfFileTest.java index 879eb3a8f..15b9dd728 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/EndOfFileTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/EndOfFileTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/FinalizeTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/FinalizeTest.java index 82580ba72..230440b98 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/FinalizeTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/FinalizeTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ReadWriteTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ReadWriteTest.java index 19cc33827..7e75a455d 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ReadWriteTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ReadWriteTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelectorTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelectorTest.java index f2acf0048..31a55e38c 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelectorTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelectorTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java index 1c492165d..281295cd0 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketCloseTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketCloseTest.java index 828687900..73db28d71 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketCloseTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketCloseTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketTest.java index 18ef7af88..5fa6cc1d7 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ServerSocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SoTimeoutTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SoTimeoutTest.java index 475970f13..41bbc9388 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SoTimeoutTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SoTimeoutTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketChannelTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketChannelTest.java index 1bfd02121..a51a59c9e 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketChannelTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketChannelTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketOptionsTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketOptionsTest.java index bd2add7e5..51da6251f 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketOptionsTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketPairTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketPairTest.java index 62fc9f965..7b415d581 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketPairTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketPairTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java index 3e2592cb0..50d720ee8 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SocketTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/StandardSocketOptionsTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/StandardSocketOptionsTest.java index 8feb252a6..3eb21f8f0 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/StandardSocketOptionsTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/StandardSocketOptionsTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/TcpNoDelayTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/TcpNoDelayTest.java index 409e30500..2a2f46297 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/TcpNoDelayTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/TcpNoDelayTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ThroughputTest.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ThroughputTest.java index ee1eb11cd..bb0bc63d9 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ThroughputTest.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/ThroughputTest.java @@ -1,7 +1,7 @@ /* * junixsocket * - * Copyright 2009-2022 Christian Kohlschütter + * Copyright 2009-2023 Christian Kohlschütter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 073925a3f0d42972e7364899737b2bb2d69c2566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 12:33:16 +0200 Subject: [PATCH 074/768] selftest: auto-skip RMI tests if unsupported; improve wording Not all environments support RMI. Detect this and automatically skip junixsocket-rmi tests if necessary. Change the wording from "skipped by user request" to "skipped automatically" in this case. --- .../newsclub/net/unix/selftest/Selftest.java | 75 ++++++++++++++----- 1 file changed, 55 insertions(+), 20 deletions(-) diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java index c58d97e1c..9252514bc 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java @@ -85,11 +85,11 @@ public class Selftest { private boolean inconclusive = false; private enum Result { - SKIP, PASS, DONE, NONE, FAIL + AUTOSKIP, SKIP, PASS, DONE, NONE, FAIL } private enum SkipMode { - UNDECLARED(false), KEEP(false), SKIP(true), SKIP_FORCE(true); + UNDECLARED(false), KEEP(false), SKIP(true), SKIP_FORCE(true), SKIP_AUTO(true); boolean skip; @@ -106,7 +106,7 @@ boolean isDeclared() { } boolean isForce() { - return this == SKIP_FORCE; + return this == SKIP_FORCE || this == SKIP_AUTO; } public static final SkipMode parse(String skipMode) { @@ -114,6 +114,8 @@ public static final SkipMode parse(String skipMode) { return SkipMode.UNDECLARED; } else if ("force".equalsIgnoreCase(skipMode)) { return SkipMode.SKIP_FORCE; + } else if ("force_auto".equalsIgnoreCase(skipMode)) { + return SkipMode.SKIP_AUTO; } else { return Boolean.valueOf(skipMode) ? SkipMode.SKIP : SkipMode.KEEP; } @@ -148,15 +150,25 @@ public void checkVM() { if (!getSkipModeForModule("junixsocket-rmi").isDeclared()) { important.add("Auto-skipping junixsocket-rmi tests due to Substrate VM"); - System.setProperty("selftest.skip.junixsocket-rmi", "force"); + System.setProperty("selftest.skip.junixsocket-rmi", "force_auto"); withIssues = true; } if (!getSkipModeForClass("org.newsclub.net.unix.FileDescriptorCastTest").isDeclared()) { important.add("Auto-skipping FileDescriptorCastTest tests due to Substrate VM"); - System.setProperty("selftest.skip.FileDescriptorCastTest", "force"); + System.setProperty("selftest.skip.FileDescriptorCastTest", "force_auto"); withIssues = true; } + } else { + if (!getSkipModeForModule("junixsocket-rmi").isDeclared()) { + try { + Class.forName("java.rmi.Remote"); + } catch (ClassNotFoundException e) { + important.add("Auto-skipping junixsocket-rmi tests due to java.rmi.Remote class missing"); + System.setProperty("selftest.skip.junixsocket-rmi", "force_auto"); + withIssues = true; + } + } } } @@ -166,11 +178,35 @@ public void checkVM() { * A zero error code indicates success. * * @param args Ignored. - * @throws IOException on error. + * @throws Exception on error. */ @SuppressFBWarnings({ "THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"}) public static void main(String[] args) throws Exception { + int rc = runSelftest(); + + if (SystemPropertyUtil.getBooleanSystemProperty("selftest.wait.at-end", false)) { + System.gc(); // NOPMD + System.out.print("Press any key to end test. "); + System.out.flush(); + System.in.read(); + System.out.println("RC=" + rc); + } + System.out.flush(); + + System.exit(rc); // NOPMD + } + + /** + * Run this from some other Java code to ensure junixsocket works correctly on the target system. + * + * A zero return value indicates success. + * + * @throws Exception on error. + */ + @SuppressFBWarnings({ + "THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"}) + public static int runSelftest() throws Exception { Selftest st = new Selftest(); st.checkVM(); @@ -215,16 +251,8 @@ public static void main(String[] args) throws Exception { int rc = st.isFail() ? 1 : 0; - if (SystemPropertyUtil.getBooleanSystemProperty("selftest.wait.at-end", false)) { - System.gc(); // NOPMD - System.out.print("Press any key to end test. "); - System.out.flush(); - System.in.read(); - System.out.println("RC=" + rc); - } - System.out.flush(); - System.exit(rc); // NOPMD + return rc; } public void printExplanation() throws IOException { @@ -397,9 +425,14 @@ public void dumpResults() { // NOPMD String result = res == null ? null : res.result.name(); String extra; - if (res == null || (res.result == Result.SKIP && res.throwable == null)) { + if (res == null || ((res.result == Result.SKIP || res.result == Result.AUTOSKIP) + && res.throwable == null)) { result = "SKIP"; - extra = "(skipped by user request)"; + if (res != null && res.result == Result.AUTOSKIP) { + extra = "(skipped automatically)"; + } else { + extra = "(skipped by user request)"; + } } else if (res.summary == null) { extra = res.throwable == null ? "(unknown error)" : res.throwable.toString(); fail = true; @@ -485,13 +518,15 @@ public void runTests(String module, Class[] testClasses) { SkipMode skipMode; if ((skipMode = getSkipModeForModule(module)).isSkip()) { - out.println("Skipping module " + module + "; skipped by request" + (skipMode.isForce() - ? " (force)" : "")); + boolean autoSkip = skipMode == SkipMode.SKIP_AUTO; + + out.println("Skipping module " + module + "; skipped " + (autoSkip ? "automatically" + : "by user request" + (skipMode.isForce() ? " (force)" : ""))); if (!skipMode.isForce()) { withIssues = true; modified = true; } - moduleResult = new ModuleResult(Result.SKIP, null, null); + moduleResult = new ModuleResult(autoSkip ? Result.AUTOSKIP : Result.SKIP, null, null); } else { List> list = new ArrayList<>(testClasses.length); for (Class testClass : testClasses) { From d427aebdb9b8fbe42ea37d54766d4ee3249c4844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 12:45:15 +0200 Subject: [PATCH 075/768] ThroughputTest: Reduce default payload size; custom datagram size It looks like on macOS, a payload of 2048 for datagrams may be too large (hangs sometimes). Lower the payload, and add a custom payload size for datagrams. --- .../org/newsclub/net/unix/ThroughputTest.java | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java index 732da92eb..43631731b 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ThroughputTest.java @@ -64,12 +64,15 @@ * This test measures throughput for sending and receiving messages over AF_UNIX, comparing * implementations of junixsocket and JEP 380 (Java 16). * - * The test is enabled by default, and also included with the self-test. + * The test is enabled by default (only runs for a very short time), and is also included within the + * self-test. * * The tests can be configured as follows (all system properties): *

* @@ -82,7 +85,9 @@ public abstract class ThroughputTest extends SocketTest protected static final int ENABLED = SystemPropertyUtil.getIntSystemProperty( "org.newsclub.net.unix.throughput-test.enabled", 1); protected static final int PAYLOAD_SIZE = SystemPropertyUtil.getIntSystemProperty( - "org.newsclub.net.unix.throughput-test.payload-size", 2048); // 8192 is much faster + "org.newsclub.net.unix.throughput-test.payload-size", 1400); // 8192 is much faster + protected static final int PAYLOAD_SIZE_DATAGRAM = SystemPropertyUtil.getIntSystemProperty( + "org.newsclub.net.unix.throughput-test.payload-size.datagram", PAYLOAD_SIZE); protected static final int NUM_SECONDS = SystemPropertyUtil.getIntSystemProperty( "org.newsclub.net.unix.throughput-test.seconds", 0); protected static final int NUM_MILLISECONDS = Math.max(50, NUM_SECONDS * 1000); @@ -331,7 +336,8 @@ public void testDatagramPacket() throws Exception { long sentTotal = 0; new Thread() { - final DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE], PAYLOAD_SIZE); + final DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE_DATAGRAM], + PAYLOAD_SIZE_DATAGRAM); @Override public void run() { @@ -343,7 +349,7 @@ public void run() { continue; } int read = dp.getLength(); - if (read != PAYLOAD_SIZE && read != 0) { + if (read != PAYLOAD_SIZE_DATAGRAM && read != 0) { throw new IOException("Unexpected response length: " + read); } readTotal.addAndGet(dp.getLength()); @@ -360,7 +366,8 @@ public void run() { long time = System.currentTimeMillis(); - DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE], PAYLOAD_SIZE); + DatagramPacket dp = new DatagramPacket(new byte[PAYLOAD_SIZE_DATAGRAM], + PAYLOAD_SIZE_DATAGRAM); byte[] data = dp.getData(); for (int i = 0; i < data.length; i++) { data[i] = (byte) i; @@ -373,7 +380,7 @@ public void run() { e.addSuppressed(new Exception(dp.getSocketAddress().toString())); throw e; } - sentTotal += PAYLOAD_SIZE; + sentTotal += PAYLOAD_SIZE_DATAGRAM; } time = System.currentTimeMillis() - time; keepRunning.set(false); @@ -382,8 +389,8 @@ public void run() { long readTotal0 = readTotal.get(); reportResults(stbTestType() + " DatagramPacket", ((1000f * readTotal0 / time) / 1000f - / 1000f) + " MB/s for payload size " + PAYLOAD_SIZE + "; " + String.format( - Locale.ENGLISH, "%.1f%% packet loss", 100 * (1 - (readTotal0 + / 1000f) + " MB/s for datagram payload size " + PAYLOAD_SIZE_DATAGRAM + "; " + String + .format(Locale.ENGLISH, "%.1f%% packet loss", 100 * (1 - (readTotal0 / (float) sentTotal)))); } }); @@ -502,8 +509,8 @@ protected void testSocketDatagramChannel(String id, DatagramChannel ds, Datagram new Thread() { @Override public void run() { - final ByteBuffer receiveBuffer = direct ? ByteBuffer.allocateDirect(PAYLOAD_SIZE) - : ByteBuffer.allocate(PAYLOAD_SIZE); + final ByteBuffer receiveBuffer = direct ? ByteBuffer.allocateDirect(PAYLOAD_SIZE_DATAGRAM) + : ByteBuffer.allocate(PAYLOAD_SIZE_DATAGRAM); try { SelectionKey key; if (readSelector != null) { @@ -528,7 +535,7 @@ public void run() { } read = ds.read(receiveBuffer); receiveBuffer.rewind(); - if (read != PAYLOAD_SIZE && read != 0 && read != -1) { + if (read != PAYLOAD_SIZE_DATAGRAM && read != 0 && read != -1) { throw new IOException("Unexpected response length: " + read); } readTotal.addAndGet(read); @@ -550,8 +557,8 @@ public void run() { time = System.currentTimeMillis(); - final ByteBuffer sendBuffer = direct ? ByteBuffer.allocateDirect(PAYLOAD_SIZE) : ByteBuffer - .allocate(PAYLOAD_SIZE); + final ByteBuffer sendBuffer = direct ? ByteBuffer.allocateDirect(PAYLOAD_SIZE_DATAGRAM) + : ByteBuffer.allocate(PAYLOAD_SIZE_DATAGRAM); try (AbstractSelector writeSelector = sp == null ? null : sp.openSelector()) { // NOPMD if (sp != null) { @@ -576,11 +583,11 @@ public void run() { } } - if (written != PAYLOAD_SIZE && written != 0) { + if (written != PAYLOAD_SIZE_DATAGRAM && written != 0) { throw new IOException("Unexpected written length: " + written); } - sentTotal += PAYLOAD_SIZE; + sentTotal += PAYLOAD_SIZE_DATAGRAM; sendBuffer.rewind(); } } finally { @@ -599,8 +606,9 @@ public void run() { long readTotal0 = readTotal.get(); reportResults(id + " direct=" + direct + ";blocking=" + blocking, ((1000f * readTotal0 / time) - / 1000f / 1000f) + " MB/s for payload size " + PAYLOAD_SIZE + "; " + String.format( - Locale.ENGLISH, "%.1f%% packet loss", 100 * (1 - (readTotal0 / (float) sentTotal)))); + / 1000f / 1000f) + " MB/s for datagram payload size " + PAYLOAD_SIZE_DATAGRAM + "; " + + String.format(Locale.ENGLISH, "%.1f%% packet loss", 100 * (1 - (readTotal0 + / (float) sentTotal)))); } From 2ac91387b4491bb550d61856cddcd575dbc5162b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 12:48:27 +0200 Subject: [PATCH 076/768] native: Make sure our exception is thrown upon missing port field Swallow any JNI-thrown exception upon missing/inaccessible "port" field in InetSocketAddress. --- junixsocket-native/src/main/c/reflection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/junixsocket-native/src/main/c/reflection.c b/junixsocket-native/src/main/c/reflection.c index 0c1c4d098..4a01e1710 100644 --- a/junixsocket-native/src/main/c/reflection.c +++ b/junixsocket-native/src/main/c/reflection.c @@ -98,6 +98,7 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_setPort( portField = (*env)->GetFieldID(env, fileDescriptorClass, "port", "I"); } if(portField == NULL) { + (*env)->ExceptionClear(env); _throwException(env, kExceptionSocketException, "Cannot find field \"port\" in java.net.InetSocketAddress. Unsupported JVM?"); return; From 4c3bfd82c5832e3882a6f84ee5e04fbc5fbb7c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 12:49:41 +0200 Subject: [PATCH 077/768] AFSocketAddress: Initialize port without JNI, if possible Ports in the range 0-65536 can be set without resorting to JNI tricks. --- .../main/java/org/newsclub/net/unix/AFSocketAddress.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java index 0b2827f54..c9ec3a832 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketAddress.java @@ -116,13 +116,13 @@ protected AFSocketAddress(int port, final byte[] socketAddress, ByteBuffer nativ * Using a resolved address (with the address bit initialized) would be ideal, but resolved * addresses can only be IPv4 or IPv6 (at least as of Java 16 and earlier). */ - super(AFInetAddress.createUnresolvedHostname(socketAddress, af), 0); + super(AFInetAddress.createUnresolvedHostname(socketAddress, af), port >= 0 && port <= 0xffff + ? port : 0); this.nativeAddress = nativeAddress == null ? null : (ByteBuffer) (Object) nativeAddress .duplicate().rewind(); if (port < -1) { throw new IllegalArgumentException("port out of range"); - } - if (port > 0) { + } else if (port > 0xffff) { if (!NativeUnixSocket.isLoaded()) { throw (SocketException) new SocketException( "Cannot set SocketAddress port - junixsocket JNI library is not available").initCause( From c07865f8fdcb6bac564cba928faaefefc7400488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 17:17:42 +0200 Subject: [PATCH 078/768] Capabilities: Fix initialization to prevent a race condition Socket capabilities may erroneously return "0" (or some capabilities missing) due to a race condition during initialization. Delay accessing capabilities to the pointer after initialization. --- .../java/org/newsclub/net/unix/AFSocket.java | 19 +++++++++++------ .../net/unix/NativeLibraryLoader.java | 9 ++++---- .../newsclub/net/unix/NativeUnixSocket.java | 21 ++++++++++++++++--- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java index d97a78bde..36f0eb0aa 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocket.java @@ -47,7 +47,7 @@ public abstract class AFSocket extends Socket impleme @SuppressWarnings("PMD.MutableStaticState") static String loadedLibrary; // set by NativeLibraryLoader - private static final int CAPABILITIES = initCapabilities(); + private static Integer capabilitiesValue = null; private final AFSocketImpl impl; @@ -371,6 +371,11 @@ public final void ensureAncillaryReceiveBufferSize(int minSize) { impl.ensureAncillaryReceiveBufferSize(minSize); } + private static boolean isCapDisabled(AFSocketCapability cap) { + return Boolean.valueOf(System.getProperty(PROP_LIBRARY_DISABLE_CAPABILITY_PREFIX + cap.name(), + "false")); + } + private static int initCapabilities() { if (!isSupported()) { return 0; @@ -392,9 +397,11 @@ private static int initCapabilities() { } } - private static boolean isCapDisabled(AFSocketCapability cap) { - return Boolean.valueOf(System.getProperty(PROP_LIBRARY_DISABLE_CAPABILITY_PREFIX + cap.name(), - "false")); + private static synchronized int capabilities() { + if (capabilitiesValue == null) { + capabilitiesValue = initCapabilities(); + } + return capabilitiesValue; } /** @@ -412,7 +419,7 @@ private static boolean isCapDisabled(AFSocketCapability cap) { */ @Deprecated public static final boolean supports(AFUNIXSocketCapability capability) { - return (CAPABILITIES & capability.getBitmask()) != 0; + return (capabilities() & capability.getBitmask()) != 0; } /** @@ -426,7 +433,7 @@ public static final boolean supports(AFUNIXSocketCapability capability) { * @return true if supported. */ public static final boolean supports(AFSocketCapability capability) { - return (CAPABILITIES & capability.getBitmask()) != 0; + return (capabilities() & capability.getBitmask()) != 0; } /** diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java index 397d0192f..d7a3f22f9 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.Objects; import java.util.Properties; +import java.util.concurrent.atomic.AtomicBoolean; import com.kohlschutter.annotations.compiletime.SuppressFBWarnings; @@ -44,7 +45,7 @@ final class NativeLibraryLoader implements Closeable { private static final List ARCHITECTURE_AND_OS = architectureAndOS(); private static final String LIBRARY_NAME = "junixsocket-native"; - private static boolean loaded = false; + private static final AtomicBoolean LOADED = new AtomicBoolean(false); static { String dir = System.getProperty(PROP_LIBRARY_TMPDIR, null); @@ -205,8 +206,8 @@ private synchronized void setLoaded(String library) { @SuppressFBWarnings("THROWS_METHOD_THROWS_RUNTIMEEXCEPTION") private static synchronized void setLoaded0(String library) { - if (!loaded) { - loaded = true; + if (LOADED.compareAndSet(false, true)) { + NativeUnixSocket.setLoaded(true); AFSocket.loadedLibrary = library; try { NativeUnixSocket.initPre(); @@ -258,7 +259,7 @@ private static Object loadLibrarySyncMonitor() { @SuppressWarnings("null") public synchronized void loadLibrary() { synchronized (loadLibrarySyncMonitor()) { // NOPMD We want to lock this class' classloader. - if (loaded) { + if (LOADED.get()) { // Already loaded return; } diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java index 76ca35a3e..5a5d2a7c3 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java @@ -28,6 +28,8 @@ import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.nio.channels.spi.AbstractSelectableChannel; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; import org.newsclub.net.unix.AFSelector.PollFd; @@ -40,7 +42,7 @@ * @author Christian Kohlschütter */ final class NativeUnixSocket { - private static boolean loaded; + private static final CompletableFuture LOADED = new CompletableFuture<>(); static final int DOMAIN_UNIX = 1; static final int DOMAIN_TIPC = 30; @@ -77,12 +79,15 @@ private NativeUnixSocket() { } static { + boolean loadSuccessful = false; try (NativeLibraryLoader nll = new NativeLibraryLoader()) { nll.loadLibrary(); - loaded = true; + loadSuccessful = true; } catch (RuntimeException | Error e) { initError = e; e.printStackTrace(); // keep + } finally { + setLoaded(loadSuccessful); } AFAddressFamily.registerAddressFamily("un", NativeUnixSocket.DOMAIN_UNIX, @@ -94,7 +99,13 @@ private NativeUnixSocket() { } static boolean isLoaded() { - return loaded; + boolean loadSuccessful; + try { + loadSuccessful = LOADED.get(); + } catch (InterruptedException | ExecutionException e) { + loadSuccessful = false; + } + return loadSuccessful; } static void ensureSupported() throws UnsupportedOperationException { @@ -286,4 +297,8 @@ static native boolean initPipe(FileDescriptor source, FileDescriptor sink, boole static native int sockTypeToNative(int type) throws IOException; static native int vsockGetLocalCID() throws IOException; + + static void setLoaded(boolean successful) { + LOADED.complete(successful); + } } From 798fa9f40c1a358f16b7a7d32e34a261d9541c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 17:42:37 +0200 Subject: [PATCH 079/768] capabilities: Add CAPABILITY_LARGE_PORTS Not all environments support setting ports larger than 65535 (which we currently do via JNI), which is required for RMI-over-AF_UNIX, for example. Expose this situation via a capability and adjust tests accordingly. --- .../newsclub/net/unix/AFSocketCapability.java | 8 ++++ .../net/unix/domain/SocketAddressTest.java | 27 +++++++++-- junixsocket-native/src/main/c/capabilities.c | 34 ++++++++------ junixsocket-native/src/main/c/init.c | 6 ++- junixsocket-native/src/main/c/reflection.c | 45 +++++++++++++++++-- junixsocket-native/src/main/c/reflection.h | 2 + .../newsclub/net/unix/selftest/Selftest.java | 7 +++ 7 files changed, 106 insertions(+), 23 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java index 9b8d9a268..6697133d4 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFSocketCapability.java @@ -130,6 +130,14 @@ public enum AFSocketCapability { */ CAPABILITY_UNSAFE(12), + /** + * Support for port numbers larger than 65535 (0xffff). + * + * Not all systems allow setting port numbers beyond the default TCP range (we use JNI tricks for + * that). This capability is required for RMI support. + */ + CAPABILITY_LARGE_PORTS(13), + ; // end of list private final int bitmask; diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java index d144f8e89..3815a8f4c 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/domain/SocketAddressTest.java @@ -32,6 +32,8 @@ import java.nio.charset.Charset; import org.junit.jupiter.api.Test; +import org.newsclub.net.unix.AFSocket; +import org.newsclub.net.unix.AFSocketCapability; import org.newsclub.net.unix.AFUNIXSocketAddress; import org.newsclub.net.unix.SocketTestBase; @@ -50,18 +52,35 @@ public SocketAddressTest() { public void testPort() throws IOException { assertEquals(0, AFUNIXSocketAddress.of(new File("/tmp/whatever")).getPort()); assertEquals(123, AFUNIXSocketAddress.of(new File("/tmp/whatever"), 123).getPort()); - assertEquals(44444, AFUNIXSocketAddress.of(new File("/tmp/whatever"), 44444).getPort()); try { AFUNIXSocketAddress.of(new File("/tmp/whatever"), -2); fail("Expected IllegalArgumentException for illegal port"); - } catch (final IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // expected } + + assertEquals(44444, AFUNIXSocketAddress.of(new File("/tmp/whatever"), 44444).getPort()); + + AFUNIXSocketAddress.of(new File("/tmp/whatever"), 65535); + } + + @Test + public void testLargePort() throws Exception { + boolean supportsLargePorts = AFSocket.supports(AFSocketCapability.CAPABILITY_LARGE_PORTS); + + try { + assertEquals(544444, AFUNIXSocketAddress.of(new File("/tmp/whatever"), 544444).getPort()); + assertTrue(supportsLargePorts); + } catch (SocketException e) { + assertFalse(supportsLargePorts); + } + try { AFUNIXSocketAddress.of(new File("/tmp/whatever"), 65536); - } catch (final IllegalArgumentException e) { - fail("AFUNIXSocketAddress supports ports larger than 65535"); + assertTrue(supportsLargePorts); + } catch (SocketException e) { + assertFalse(supportsLargePorts); } } diff --git a/junixsocket-native/src/main/c/capabilities.c b/junixsocket-native/src/main/c/capabilities.c index 46375aa17..0dd829721 100644 --- a/junixsocket-native/src/main/c/capabilities.c +++ b/junixsocket-native/src/main/c/capabilities.c @@ -21,22 +21,24 @@ #include "filedescriptors.h" #include "init.h" +#include "reflection.h" CK_IGNORE_UNUSED_VARIABLE_BEGIN // see AFSocketCapability.java in junixsocket-common -static int CAPABILITY_PEER_CREDENTIALS = (1 << 0); -static int CAPABILITY_ANCILLARY_MESSAGES = (1 << 1); -static int CAPABILITY_FILE_DESCRIPTORS = (1 << 2); -static int CAPABILITY_ABSTRACT_NAMESPACE = (1 << 3); -static int CAPABILITY_UNIX_DATAGRAMS = (1 << 4); -static int CAPABILITY_NATIVE_SOCKETPAIR = (1 << 5); -static int CAPABILITY_FD_AS_REDIRECT = (1 << 6); -static int CAPABILITY_TIPC = (1 << 7); -static int CAPABILITY_UNIX_DOMAIN = (1 << 8); -static int CAPABILITY_VSOCK = (1 << 9); -static int CAPABILITY_VSOCK_DGRAM = (1 << 10); -static int CAPABILITY_ZERO_LENGTH_SEND = (1 << 11); -static int CAPABILITY_UNSAFE = (1 << 12); +static jint CAPABILITY_PEER_CREDENTIALS = (1 << 0); +static jint CAPABILITY_ANCILLARY_MESSAGES = (1 << 1); +static jint CAPABILITY_FILE_DESCRIPTORS = (1 << 2); +static jint CAPABILITY_ABSTRACT_NAMESPACE = (1 << 3); +static jint CAPABILITY_UNIX_DATAGRAMS = (1 << 4); +static jint CAPABILITY_NATIVE_SOCKETPAIR = (1 << 5); +static jint CAPABILITY_FD_AS_REDIRECT = (1 << 6); +static jint CAPABILITY_TIPC = (1 << 7); +static jint CAPABILITY_UNIX_DOMAIN = (1 << 8); +static jint CAPABILITY_VSOCK = (1 << 9); +static jint CAPABILITY_VSOCK_DGRAM = (1 << 10); +static jint CAPABILITY_ZERO_LENGTH_SEND = (1 << 11); +static jint CAPABILITY_UNSAFE = (1 << 12); +static jint CAPABILITY_LARGE_PORTS = (1 << 13); CK_IGNORE_UNUSED_VARIABLE_END void init_capabilities(JNIEnv *env CK_UNUSED) { @@ -53,7 +55,7 @@ void destroy_capabilities(JNIEnv *env CK_UNUSED) { JNIEXPORT jint JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_capabilities( JNIEnv *env CK_UNUSED, jclass clazz CK_UNUSED) { - int capabilities = 0; + jint capabilities = 0; #if !defined(_WIN32) capabilities |= CAPABILITY_UNSAFE; @@ -113,5 +115,9 @@ defined(SO_PEERCRED) || defined(SO_PEERID) || defined(__NetBSD__) || defined(__s capabilities |= CAPABILITY_ZERO_LENGTH_SEND; } + if(supportsLargePorts()) { + capabilities |= CAPABILITY_LARGE_PORTS; + } + return capabilities; } diff --git a/junixsocket-native/src/main/c/init.c b/junixsocket-native/src/main/c/init.c index 9a48dedcf..b944d0f83 100644 --- a/junixsocket-native/src/main/c/init.c +++ b/junixsocket-native/src/main/c/init.c @@ -140,8 +140,8 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_init } #endif - init_exceptions(env); - init_capabilities(env); + init_exceptions(env); // should be first + init_reflection(env); init_unix(); init_filedescriptors(env); @@ -157,6 +157,8 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_init #endif init_poll(env); init_socketoptions(env); + + init_capabilities(env); // should be last } /* diff --git a/junixsocket-native/src/main/c/reflection.c b/junixsocket-native/src/main/c/reflection.c index 4a01e1710..6bda99ec3 100644 --- a/junixsocket-native/src/main/c/reflection.c +++ b/junixsocket-native/src/main/c/reflection.c @@ -27,6 +27,10 @@ static jboolean doSetServerSocket = true; static jclass kClassAbstractSelectableChannel; static jmethodID kMethodRemoveKey; +static jboolean cap_largePorts = false; + +static jboolean checkCapLargePorts(JNIEnv *env); + void init_reflection(JNIEnv *env) { kClassAbstractSelectableChannel = findClassAndGlobalRef(env, "java/nio/channels/spi/AbstractSelectableChannel"); if(kClassAbstractSelectableChannel) { @@ -41,6 +45,8 @@ void init_reflection(JNIEnv *env) { } } } + + cap_largePorts = checkCapLargePorts(env); } void destroy_reflection(JNIEnv *env) { @@ -83,19 +89,19 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_initServerImp JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_setPort( JNIEnv * env, jclass clazz CK_UNUSED, jobject addr, jint port) { - jclass fileDescriptorClass = (*env)->GetObjectClass(env, addr); + jclass clsInetSocketAddress = (*env)->GetObjectClass(env, addr); jobject fieldObject = addr; jfieldID portField; - jfieldID holderField = (*env)->GetFieldID(env, fileDescriptorClass, + jfieldID holderField = (*env)->GetFieldID(env, clsInetSocketAddress, "holder", "Ljava/net/InetSocketAddress$InetSocketAddressHolder;"); if(holderField != NULL) { fieldObject = (*env)->GetObjectField(env, addr, holderField); jclass holderClass = (*env)->GetObjectClass(env, fieldObject); portField = (*env)->GetFieldID(env, holderClass, "port", "I"); } else { - portField = (*env)->GetFieldID(env, fileDescriptorClass, "port", "I"); + portField = (*env)->GetFieldID(env, clsInetSocketAddress, "port", "I"); } if(portField == NULL) { (*env)->ExceptionClear(env); @@ -184,3 +190,36 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_deregisterSel // FIXME } } + +jboolean supportsLargePorts(void) { + return cap_largePorts; +} + +static jboolean checkCapLargePorts(JNIEnv *env) { + jclass cls = (*env)->FindClass(env, "java/net/InetSocketAddress"); + if((*env)->ExceptionCheck(env)) { + (*env)->ExceptionClear(env); + return false; + } + + jmethodID constructor = (*env)->GetMethodID(env, cls, "", "(I)V"); + if((*env)->ExceptionCheck(env)) { + (*env)->ExceptionClear(env); + return false; + } + + jobject instance = (*env)->NewObject(env, cls, constructor, 0); + if(instance == NULL) { + (*env)->ExceptionClear(env); + return false; + } + + Java_org_newsclub_net_unix_NativeUnixSocket_setPort(env, cls, instance, 65536); + + if((*env)->ExceptionCheck(env)) { + (*env)->ExceptionClear(env); + return false; + } else { + return true; + } +} diff --git a/junixsocket-native/src/main/c/reflection.h b/junixsocket-native/src/main/c/reflection.h index 8010c6d21..8bca68a6c 100644 --- a/junixsocket-native/src/main/c/reflection.h +++ b/junixsocket-native/src/main/c/reflection.h @@ -24,4 +24,6 @@ void init_reflection(JNIEnv *env); void destroy_reflection(JNIEnv *env); +jboolean supportsLargePorts(void); + #endif /* reflection_h */ diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java index 9252514bc..2b9fdb62c 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java @@ -168,6 +168,13 @@ public void checkVM() { System.setProperty("selftest.skip.junixsocket-rmi", "force_auto"); withIssues = true; } + + if (!AFSocket.supports(AFSocketCapability.CAPABILITY_LARGE_PORTS)) { + important.add( + "Auto-skipping junixsocket-rmi tests due to missing CAPABILITY_LARGE_PORTS"); + System.setProperty("selftest.skip.junixsocket-rmi", "force_auto"); + withIssues = true; + } } } } From 525bb756af35bb46b105455a83043c657a0f530f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 17:50:34 +0200 Subject: [PATCH 080/768] native: Don't try to initialize SocketServer impl again once it fails On Android, we cannot initialize SocketServer impl. Once we realize that, we should not try the same thing over and over again. --- junixsocket-native/src/main/c/reflection.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/junixsocket-native/src/main/c/reflection.c b/junixsocket-native/src/main/c/reflection.c index 6bda99ec3..039ea2311 100644 --- a/junixsocket-native/src/main/c/reflection.c +++ b/junixsocket-native/src/main/c/reflection.c @@ -31,6 +31,8 @@ static jboolean cap_largePorts = false; static jboolean checkCapLargePorts(JNIEnv *env); +static jboolean dontInitServerImpl = false; + void init_reflection(JNIEnv *env) { kClassAbstractSelectableChannel = findClassAndGlobalRef(env, "java/nio/channels/spi/AbstractSelectableChannel"); if(kClassAbstractSelectableChannel) { @@ -61,6 +63,10 @@ void destroy_reflection(JNIEnv *env) { JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_initServerImpl( JNIEnv * env, jclass clazz CK_UNUSED, jobject serverSocket, jobject impl) { + if(dontInitServerImpl) { + return; + } + callObjectSetter(env, serverSocket, "", "(Ljava/net/SocketImpl;)V", impl); if(!(*env)->ExceptionCheck(env)) { // all done @@ -73,6 +79,8 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_initServerImp if((*env)->ExceptionCheck(env)) { (*env)->ExceptionClear(env); // cannot access impl (probably Android) + + dontInitServerImpl = true; return; } else if(doSetServerSocket) { // no longer present in Java 16 From 0b3a4f3093703607e5ecd41515494735405b5a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Fri, 16 Jun 2023 18:38:46 +0200 Subject: [PATCH 081/768] native: Autodetect available JNI library We don't have to set a system property if the library has been loaded manually. This also prevents junixsocket from being in a half-initialized state. --- .../org/newsclub/net/unix/FileDescriptorCast.java | 3 +++ .../newsclub/net/unix/NativeLibraryLoader.java | 15 ++++++++++++++- .../org/newsclub/net/unix/NativeUnixSocket.java | 7 +++++++ junixsocket-native/src/main/c/init.c | 10 ++++++++++ .../c/org_newsclub_net_unix_NativeUnixSocket.h | 8 ++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java index 2d1047c91..bb63edb8e 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java @@ -185,6 +185,9 @@ private FileDescriptorCast(FileDescriptor fdObj, CastingProviderMap cpm) { } private static int getFdIfPossible(FileDescriptor fd) { + if (!NativeUnixSocket.isLoaded()) { + return -1; + } try { return NativeUnixSocket.getFD(fd); } catch (IOException e) { diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java index d7a3f22f9..7b8457b77 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java @@ -210,7 +210,6 @@ private static synchronized void setLoaded0(String library) { NativeUnixSocket.setLoaded(true); AFSocket.loadedLibrary = library; try { - NativeUnixSocket.initPre(); NativeUnixSocket.init(); } catch (RuntimeException e) { throw e; @@ -264,6 +263,8 @@ public synchronized void loadLibrary() { return; } + NativeUnixSocket.initPre(); + // set -Dorg.newsclub.net.unix.library.override.force=provided to assume that // we already have loaded the library via System.load, etc. if ("provided".equals(System.getProperty(PROP_LIBRARY_OVERRIDE_FORCE, ""))) { @@ -271,6 +272,18 @@ public synchronized void loadLibrary() { return; } + boolean provided = false; + try { + NativeUnixSocket.noop(); + provided = true; + } catch (UnsatisfiedLinkError | Exception e) { + // expected unless we manually loaded the library + } + if (provided) { + setLoaded("provided"); + return; + } + if (Boolean.valueOf(System.getProperty(PROP_LIBRARY_DISABLE, "false"))) { throw initCantLoadLibraryError(Collections.singletonList(new UnsupportedOperationException( "junixsocket disabled by System.property " + PROP_LIBRARY_DISABLE))); diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java index 5a5d2a7c3..62688e7fd 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java @@ -147,6 +147,13 @@ private static void tryResolveClass(String className) { @SuppressFBWarnings("THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION") static native void destroy() throws Exception; + /** + * Can be used to check (without side-effects) if the library has been loaded. + * + * Terminates normally if so; throws {@link UnsatisfiedLinkError} if not. + */ + static native void noop(); + static native int capabilities(); static native byte[] sockname(int domain, FileDescriptor fd, boolean peer); diff --git a/junixsocket-native/src/main/c/init.c b/junixsocket-native/src/main/c/init.c index b944d0f83..39feb5272 100644 --- a/junixsocket-native/src/main/c/init.c +++ b/junixsocket-native/src/main/c/init.c @@ -183,3 +183,13 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_destroy destroy_poll(env); destroy_socketoptions(env); } + +/* + + * Class: org_newsclub_net_unix_NativeUnixSocket + + * Method: noop + + * Signature: ()V + + */ +JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_noop +(JNIEnv *env CK_UNUSED, jclass clazz CK_UNUSED) { + // no-op +} diff --git a/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.h b/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.h index b165e1d27..0b568aa56 100644 --- a/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.h +++ b/junixsocket-native/src/main/c/org_newsclub_net_unix_NativeUnixSocket.h @@ -57,6 +57,14 @@ JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_init JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_destroy (JNIEnv *, jclass); +/* + * Class: org_newsclub_net_unix_NativeUnixSocket + * Method: noop + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_noop + (JNIEnv *, jclass); + /* * Class: org_newsclub_net_unix_NativeUnixSocket * Method: capabilities From 2632073c6bc42a0f1a316a8d81a700a38894eed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sat, 17 Jun 2023 15:11:26 +0200 Subject: [PATCH 082/768] selftest: Show more properties On Android, we have to look up most System properties one by one, so let's do that. Moreover, we can report junixsocket-specific properties, such as the Architecture-and-OS strings used for native-library lookup. --- .../net/unix/NativeLibraryLoader.java | 4 + .../newsclub/net/unix/SelftestProvider.java | 12 +++ .../net/unix/rmi/SelftestProvider.java | 4 + .../net/unix/selftest/SelftestProvider.java | 8 ++ .../newsclub/net/unix/selftest/Selftest.java | 88 ++++++++++++++++++- .../net/unix/selftest/SelftestProvider.java | 5 ++ .../net/unix/tipc/SelftestProvider.java | 6 +- .../net/unix/vsock/SelftestProvider.java | 6 +- 8 files changed, 127 insertions(+), 6 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java index 7b8457b77..6c360f45c 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java @@ -378,6 +378,10 @@ private static List architectureAndOS() { return list; } + static List getArchitectureAndOS() { + return ARCHITECTURE_AND_OS; + } + private List findLibraryCandidates(String artifactName, String libraryNameAndVersion, Class providerClass) { String mappedName = System.mapLibraryName(libraryNameAndVersion); diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java index 277f95d37..804f87e2a 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/SelftestProvider.java @@ -17,7 +17,10 @@ */ package org.newsclub.net.unix; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; import java.net.InetSocketAddress; +import java.nio.charset.Charset; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -131,4 +134,13 @@ public Map[]> tests() { return tests; } + + public void printAdditionalProperties(PrintWriter out) { + out.println("Native architecture: " + NativeLibraryLoader.getArchitectureAndOS()); + } + + public static void main(String[] args) { + new SelftestProvider().printAdditionalProperties(new PrintWriter(new OutputStreamWriter( + System.out, Charset.defaultCharset()), true)); + } } \ No newline at end of file diff --git a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java index ffb9330c1..f1b96660e 100644 --- a/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java +++ b/junixsocket-rmi/src/test/java/org/newsclub/net/unix/rmi/SelftestProvider.java @@ -17,6 +17,7 @@ */ package org.newsclub.net.unix.rmi; +import java.io.PrintWriter; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; @@ -45,4 +46,7 @@ public Map[]> tests() { public Set modulesDisabledByDefault() { return Collections.emptySet(); } + + public void printAdditionalProperties(PrintWriter out) { + } } diff --git a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java index 994a41687..02a31f3be 100644 --- a/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java +++ b/junixsocket-selftest/src/main/java-overlay/org/newsclub/net/unix/selftest/SelftestProvider.java @@ -17,6 +17,7 @@ */ package org.newsclub.net.unix.selftest; +import java.io.PrintWriter; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; @@ -55,4 +56,11 @@ public Set modulesDisabledByDefault() { set.addAll(rmiSelftests.modulesDisabledByDefault()); return set; } + + public void printAdditionalProperties(PrintWriter out) { + commonSelftests.printAdditionalProperties(out); + tipcSelftests.printAdditionalProperties(out); + vsockSelftests.printAdditionalProperties(out); + rmiSelftests.printAdditionalProperties(out); + } } diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java index 2b9fdb62c..02ee33500 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/Selftest.java @@ -83,6 +83,7 @@ public class Selftest { private boolean isSupportedAFUNIX = false; private final Set important = new LinkedHashSet<>(); private boolean inconclusive = false; + private final SelftestProvider sp; private enum Result { AUTOSKIP, SKIP, PASS, DONE, NONE, FAIL @@ -139,7 +140,8 @@ static final class MinimizeJarDependencies { org.newsclub.lib.junixsocket.custom.NarMetadata nmCustom; } - public Selftest() { + public Selftest(SelftestProvider sp) { + this.sp = sp; } public void checkVM() { @@ -214,16 +216,17 @@ public static void main(String[] args) throws Exception { @SuppressFBWarnings({ "THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"}) public static int runSelftest() throws Exception { - Selftest st = new Selftest(); + SelftestProvider sp = new SelftestProvider(); + Selftest st = new Selftest(sp); st.checkVM(); st.printExplanation(); + st.dumpAdditionalProperties(); st.dumpSystemProperties(); st.dumpOSReleaseFiles(); st.checkSupported(); st.checkCapabilities(); - SelftestProvider sp = new SelftestProvider(); Set disabledModules = sp.modulesDisabledByDefault(); List messagesAtEnd = new ArrayList<>(); @@ -262,6 +265,13 @@ public static int runSelftest() throws Exception { return rc; } + private void dumpAdditionalProperties() { + PrintWriter pw = new PrintWriter(new OutputStreamWriter(out, Charset.defaultCharset())); + sp.printAdditionalProperties(pw); + pw.flush(); + out.println(); + } + public void printExplanation() throws IOException { out.println( "This program determines whether junixsocket is supported on the current platform."); @@ -289,9 +299,79 @@ public void printExplanation() throws IOException { } public void dumpSystemProperties() { + Map map = new TreeMap<>(System.getProperties()); + // NOTE: Some environments, such as Android, do not enumerate all available properties upon + // calling System.getProperties(). Let's make sure we catch the most important properties + // by looking them up manually, which seems to work. + + // https://github.com/AndroidSDKSources/android-sdk-sources-for-api-level-33/blob/master/ + // java/lang/System.java + // java/lang/AndroidHardcodedSystemProperties.java + for (String expectedKey : new String[] { + "android.icu.library.version", // + "android.icu.unicode.version", // + "android.icu.cldr.version", // + "ICUDebug", // + "android.icu.text.DecimalFormat.SkipExtendedSeparatorParsing", // + "android.icu.text.MessagePattern.ApostropheMode", // + "sun.io.useCanonCaches", // + "sun.io.useCanonPrefixCache", // + "sun.stdout.encoding", // + "sun.stderr.encoding", // + "http.keepAlive", // + "http.keepAliveDuration", // + "http.maxConnections", // + "javax.net.debug", // + "com.sun.security.preserveOldDCEncoding", // + "java.util.logging.manager", // + // + "file.encoding", // + "file.separator", // + "line.separator", // + "path.separator", // + "java.boot.class.path", // + "java.class.path", // + "java.class.version", // + "java.compiler", // + "java.ext.dirs", // + "java.home", // + "java.io.tmpdir", // + "java.library.path", // + "java.vendor", // + "java.vendor.url", // + "java.version", // + "java.net.preferIPv6Addresses", // + "java.specification.version", // + "java.specification.vendor", // + "java.specification.name", // + "java.vm.version", // + "java.vm.vendor", // + "java.vm.vendor.url", // + "java.vm.name", // + "java.vm.specification.version", // + "java.vm.specification.vendor", // + "java.vm.specification.name", // + "os.arch", // + "os.name", // + "os.version", // + "user.dir", // + "user.home", // + "user.language", // + "user.region", // + "user.variant", // + "user.name" // + }) { + if (!map.containsKey(expectedKey)) { + String value = System.getProperty(expectedKey); + if (value != null) { + map.put(expectedKey, value); + } + } + } + out.println("System properties:"); out.println(); - for (Map.Entry en : new TreeMap<>(System.getProperties()).entrySet()) { + for (Map.Entry en : map.entrySet()) { String key = String.valueOf(en.getKey()); String value = String.valueOf(en.getValue()); StringBuilder sb = new StringBuilder(); diff --git a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java index 0bd7b5357..45d4b5656 100644 --- a/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java +++ b/junixsocket-selftest/src/main/java/org/newsclub/net/unix/selftest/SelftestProvider.java @@ -17,6 +17,7 @@ */ package org.newsclub.net.unix.selftest; +import java.io.PrintWriter; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; @@ -44,4 +45,8 @@ public Map[]> tests() { public Set modulesDisabledByDefault() { return Collections.emptySet(); } + + public void printAdditionalProperties(PrintWriter out) { + out.println("selftest-dummy: true"); + } } diff --git a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java index e305d936a..f21d30309 100644 --- a/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java +++ b/junixsocket-tipc/src/test/java/org/newsclub/net/unix/tipc/SelftestProvider.java @@ -17,6 +17,7 @@ */ package org.newsclub.net.unix.tipc; +import java.io.PrintWriter; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -105,4 +106,7 @@ public Map[]> tests() { return tests; } -} \ No newline at end of file + + public void printAdditionalProperties(PrintWriter out) { + } +} diff --git a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java index 281295cd0..b12948148 100644 --- a/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java +++ b/junixsocket-vsock/src/test/java/org/newsclub/net/unix/vsock/SelftestProvider.java @@ -17,6 +17,7 @@ */ package org.newsclub.net.unix.vsock; +import java.io.PrintWriter; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -105,4 +106,7 @@ public Map[]> tests() { return tests; } -} \ No newline at end of file + + public void printAdditionalProperties(PrintWriter out) { + } +} From d4dfb231d2c701ccf6fc8dce218f05255ec8ec72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sat, 17 Jun 2023 16:16:04 +0200 Subject: [PATCH 083/768] native: On Android, try "Android" as the OS name first We can't load standard Linux libraries on Android, so let's start looking for something with "Android" in the name. --- .../net/unix/NativeLibraryLoader.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java index 6c360f45c..1ae5fcad1 100644 --- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java +++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java @@ -254,7 +254,6 @@ private static Object loadLibrarySyncMonitor() { } } - // NOPMD @SuppressWarnings("null") public synchronized void loadLibrary() { synchronized (loadLibrarySyncMonitor()) { // NOPMD We want to lock this class' classloader. @@ -365,11 +364,25 @@ private List initLibraryCandidates(List suppressedT return candidates; } + private static String lookupArchProperty(String key, String defaultVal) { + return System.getProperty(key, defaultVal).replaceAll("[ /\\\\'\";:\\$]", ""); + } + private static List architectureAndOS() { - String arch = System.getProperty("os.arch", "UnknownArch").replaceAll("[ /\\\\'\";:\\$]", ""); - String osName = System.getProperty("os.name", "UnknownOS").replaceAll("[ /\\\\'\";:\\$]", ""); + String arch = lookupArchProperty("os.arch", "UnknownArch"); + String osName = lookupArchProperty("os.name", "UnknownOS"); + + String vmName = lookupArchProperty("java.vm.name", "UnknownVM"); + String vmSpecVendor = lookupArchProperty("java.vm.specification.vendor", + "UnknownSpecificationVendor"); List list = new ArrayList<>(); + + if ("Dalvik".equals(vmName) || vmSpecVendor.contains("Android")) { + // Android identifies itself as os.name="Linux" + // let's probe for an Android-specific library first + list.add(arch + "-Android"); + } list.add(arch + "-" + osName); if (osName.startsWith("Windows") && !"Windows10".equals(osName)) { list.add(arch + "-" + "Windows10"); From edf13c8c86092b6094ad7443c5a8cee2bec9aa96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sat, 17 Jun 2023 17:30:21 +0200 Subject: [PATCH 084/768] native: Add support to compile for aarch64-Android (SDK level 30) --- junixsocket-native-common/pom.xml | 11 + junixsocket-native-cross/pom.xml | 50 +++- .../project.pbxproj | 213 ++++++++++++++++++ .../aarch64-linux-android30.xcscheme | 66 ++++++ .../src/main/nar/aol.properties | 22 ++ 5 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/aarch64-linux-android30.xcscheme diff --git a/junixsocket-native-common/pom.xml b/junixsocket-native-common/pom.xml index 5ef4da19c..879a2b93d 100644 --- a/junixsocket-native-common/pom.xml +++ b/junixsocket-native-common/pom.xml @@ -164,6 +164,17 @@ runtime true + + + \ No newline at end of file diff --git a/junixsocket-selftest-android/SelftestApp/app/src/main/res/values-w1240dp/dimens.xml b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values-w1240dp/dimens.xml new file mode 100644 index 000000000..d73f4a359 --- /dev/null +++ b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values-w1240dp/dimens.xml @@ -0,0 +1,3 @@ + + 200dp + \ No newline at end of file diff --git a/junixsocket-selftest-android/SelftestApp/app/src/main/res/values-w600dp/dimens.xml b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values-w600dp/dimens.xml new file mode 100644 index 000000000..96d25a4e7 --- /dev/null +++ b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values-w600dp/dimens.xml @@ -0,0 +1,4 @@ + + 48dp + 48dp + \ No newline at end of file diff --git a/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/colors.xml b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/colors.xml new file mode 100644 index 000000000..f8c6127d3 --- /dev/null +++ b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/dimens.xml b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/dimens.xml new file mode 100644 index 000000000..89ef4658d --- /dev/null +++ b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ + + 180dp + 16dp + 16dp + \ No newline at end of file diff --git a/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/ic_launcher_background.xml b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 000000000..a76c72f5e --- /dev/null +++ b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #3DDCDC + \ No newline at end of file diff --git a/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/strings.xml b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/strings.xml new file mode 100644 index 000000000..6e20f6eab --- /dev/null +++ b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/strings.xml @@ -0,0 +1,93 @@ + + My Application + + "Material is the metaphor.\n\n" + + "A material metaphor is the unifying theory of a rationalized space and a system of motion." + "The material is grounded in tactile reality, inspired by the study of paper and ink, yet " + "technologically advanced and open to imagination and magic.\n" + "Surfaces and edges of the material provide visual cues that are grounded in reality. The " + "use of familiar tactile attributes helps users quickly understand affordances. Yet the " + "flexibility of the material creates new affordances that supercede those in the physical " + "world, without breaking the rules of physics.\n" + "The fundamentals of light, surface, and movement are key to conveying how objects move, " + "interact, and exist in space and in relation to each other. Realistic lighting shows " + "seams, divides space, and indicates moving parts.\n\n" + + "Bold, graphic, intentional.\n\n" + + "The foundational elements of print based design typography, grids, space, scale, color, " + "and use of imagery guide visual treatments. These elements do far more than please the " + "eye. They create hierarchy, meaning, and focus. Deliberate color choices, edge to edge " + "imagery, large scale typography, and intentional white space create a bold and graphic " + "interface that immerse the user in the experience.\n" + "An emphasis on user actions makes core functionality immediately apparent and provides " + "waypoints for the user.\n\n" + + "Motion provides meaning.\n\n" + + "Motion respects and reinforces the user as the prime mover. Primary user actions are " + "inflection points that initiate motion, transforming the whole design.\n" + "All action takes place in a single environment. Objects are presented to the user without " + "breaking the continuity of experience even as they transform and reorganize.\n" + "Motion is meaningful and appropriate, serving to focus attention and maintain continuity. " + "Feedback is subtle yet clear. Transitions are efficient yet coherent.\n\n" + + "3D world.\n\n" + + "The material environment is a 3D space, which means all objects have x, y, and z " + "dimensions. The z-axis is perpendicularly aligned to the plane of the display, with the " + "positive z-axis extending towards the viewer. Every sheet of material occupies a single " + "position along the z-axis and has a standard 1dp thickness.\n" + "On the web, the z-axis is used for layering and not for perspective. The 3D world is " + "emulated by manipulating the y-axis.\n\n" + + "Light and shadow.\n\n" + + "Within the material environment, virtual lights illuminate the scene. Key lights create " + "directional shadows, while ambient light creates soft shadows from all angles.\n" + "Shadows in the material environment are cast by these two light sources. In Android " + "development, shadows occur when light sources are blocked by sheets of material at " + "various positions along the z-axis. On the web, shadows are depicted by manipulating the " + "y-axis only. The following example shows the card with a height of 6dp.\n\n" + + "Resting elevation.\n\n" + + "All material objects, regardless of size, have a resting elevation, or default elevation " + "that does not change. If an object changes elevation, it should return to its resting " + "elevation as soon as possible.\n\n" + + "Component elevations.\n\n" + + "The resting elevation for a component type is consistent across apps (e.g., FAB elevation " + "does not vary from 6dp in one app to 16dp in another app).\n" + "Components may have different resting elevations across platforms, depending on the depth " + "of the environment (e.g., TV has a greater depth than mobile or desktop).\n\n" + + "Responsive elevation and dynamic elevation offsets.\n\n" + + "Some component types have responsive elevation, meaning they change elevation in response " + "to user input (e.g., normal, focused, and pressed) or system events. These elevation " + "changes are consistently implemented using dynamic elevation offsets.\n" + "Dynamic elevation offsets are the goal elevation that a component moves towards, relative " + "to the component’s resting state. They ensure that elevation changes are consistent " + "across actions and component types. For example, all components that lift on press have " + "the same elevation change relative to their resting elevation.\n" + "Once the input event is completed or cancelled, the component will return to its resting " + "elevation.\n\n" + + "Avoiding elevation interference.\n\n" + + "Components with responsive elevations may encounter other components as they move between " + "their resting elevations and dynamic elevation offsets. Because material cannot pass " + "through other material, components avoid interfering with one another any number of ways, " + "whether on a per component basis or using the entire app layout.\n" + "On a component level, components can move or be removed before they cause interference. " + "For example, a floating action button (FAB) can disappear or move off screen before a " + "user picks up a card, or it can move if a snackbar appears.\n" + "On the layout level, design your app layout to minimize opportunities for interference. " + "For example, position the FAB to one side of stream of a cards so the FAB won’t interfere " + "when a user tries to pick up one of cards.\n\n" + + Settings + \ No newline at end of file diff --git a/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/themes.xml b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/themes.xml new file mode 100644 index 000000000..b4611aa13 --- /dev/null +++ b/junixsocket-selftest-android/SelftestApp/app/src/main/res/values/themes.xml @@ -0,0 +1,25 @@ + + + + + + +