From 4c1b268325a3429b6839341775b02dcddd2d149b Mon Sep 17 00:00:00 2001
From: Harald Kuhr
Date: Wed, 4 Mar 2026 10:35:04 +0100
Subject: [PATCH] Javadoc cleanup (#1255)
* #1234: Fixed JavaDoc for Java 21 + JavaDoc verification step
* #1234: Simplify build matrix
* #1234: Javadoc in parallell
---
.github/workflows/ci.yml | 34 +++++++++++-----
.../twelvemonkeys/image/DiffusionDither.java | 6 +--
.../com/twelvemonkeys/image/ImageUtil.java | 6 +--
.../com/twelvemonkeys/lang/StringUtil.java | 39 +++++++++----------
4 files changed, 49 insertions(+), 36 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4ffc5f77..243935a1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,7 +17,10 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
- java: [ 11, 17, 21, 25 ]
+ java: [ 8, 11, 17, 21, 25 ]
+ exclude:
+ - os: macos-latest
+ java: 8
runs-on: ${{ matrix.os }}
permissions:
checks: write
@@ -38,13 +41,9 @@ jobs:
report_paths: "**/target/surefire-reports/TEST*.xml"
check_name: Unit Test Results for OpenJDK ${{ matrix.java }} on ${{ matrix.os }}
- test-jdk8:
- name: Test OpenJDK 8 on ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [ ubuntu-latest, windows-latest, macos-14 ]
- runs-on: ${{ matrix.os }}
+ test-jdk8-macos:
+ name: Test OpenJDK 8 on macos-14
+ runs-on: macos-14
permissions:
checks: write
steps:
@@ -98,9 +97,26 @@ jobs:
report_paths: "**/target/surefire-reports/TEST*.xml"
check_name: Unit Test Results for Oracle JDK 8 with KCMS=${{ matrix.kcms }}
+ javadoc:
+ name: Build JavaDoc on OpenJDK ${{ matrix.java }}
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [8, 11, 25 ] # We only need a few versions here
+ steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+ with:
+ distribution: 'temurin'
+ java-version: ${{ matrix.java }}
+ java-package: jdk
+ cache: 'maven'
+ - name: Create JavaDoc
+ run: mvn --batch-mode --no-transfer-progress -DskipTests package javadoc:javadoc
+
release:
name: Deploy
- needs: [ test, test-jdk8, test-oracle ]
+ needs: [ test, test-jdk8-macos, test-oracle, javadoc ]
if: github.ref == 'refs/heads/master' # only perform on latest master
runs-on: ubuntu-latest
steps:
diff --git a/common/common-image/src/main/java/com/twelvemonkeys/image/DiffusionDither.java b/common/common-image/src/main/java/com/twelvemonkeys/image/DiffusionDither.java
index 50c21390..22417db6 100755
--- a/common/common-image/src/main/java/com/twelvemonkeys/image/DiffusionDither.java
+++ b/common/common-image/src/main/java/com/twelvemonkeys/image/DiffusionDither.java
@@ -47,10 +47,10 @@ import java.util.Random;
* |3|5|1|
* - - -->
*
- *
+ *
* Floyd-Steinberg error-diffusion weights
- * | | x | 7/16 |
+ * | | x | 7/16 |
* | 3/16 | 5/16 | 1/16 |
*
*
diff --git a/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java b/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java
index fcca6a86..75552a48 100644
--- a/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java
+++ b/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java
@@ -162,7 +162,7 @@ public final class ImageUtil {
/**
* The sharpen kernel. Uses the following 3 by 3 matrix:
- *
+ *
* Sharpen Kernel Matrix
* | 0.0 | -0.3 | 0.0 |
* | -0.3 | 2.2 | -0.3 |
@@ -1078,7 +1078,7 @@ public final class ImageUtil {
/**
* Sharpens an image using a convolution matrix.
* The sharpen kernel used, is defined by the following 3 by 3 matrix:
- *
+ *
* Sharpen Kernel Matrix
* | 0.0 | -0.3 | 0.0 |
* | -0.3 | 2.2 | -0.3 |
@@ -1100,7 +1100,7 @@ public final class ImageUtil {
/**
* Sharpens an image using a convolution matrix.
* The sharpen kernel used, is defined by the following 3 by 3 matrix:
- *
+ *
* Sharpen Kernel Matrix
* | 0.0 | -{@code pAmount} | 0.0 |
* | -{@code pAmount} |
diff --git a/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java b/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java
index 3a6b1bf0..09d66e55 100755
--- a/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java
+++ b/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java
@@ -1765,12 +1765,11 @@ public final class StringUtil {
* expression.
*
* An invocation of this method of the form
- * matches(str, regex) yields exactly the
+ * {@code matches(str, regex)} yields exactly the
* same result as the expression
*
- * {@link Pattern}.
- * {@link Pattern#matches(String, CharSequence) matches}
- * (regex, str)
+ * {@link Pattern}.
+ * {@link Pattern#matches(String, CharSequence) matches(regex, str)}
*
* @param pString the string
* @param pRegex the regular expression to which this string is to be matched
@@ -1789,16 +1788,14 @@ public final class StringUtil {
* regular expression with the given pReplacement.
*
* An invocation of this method of the form
- *
- * replaceFirst(str, regex, repl)
- *
+ * {@code replaceFirst(str, regex, repl)}
* yields exactly the same result as the expression:
*
- *
- * {@link Pattern}.{@link Pattern#compile(String) compile}(regex).
- * {@link Pattern#matcher matcher}(str).
- * {@link java.util.regex.Matcher#replaceFirst replaceFirst}(repl)
- *
+ *
+ * {@link Pattern#compile(String) Pattern.compile(regex)}
+ * {@link Pattern#matcher .matcher(str)}
+ * {@link java.util.regex.Matcher#replaceFirst .replaceFirst(repl)}
+ *
*
* @param pString the string
* @param pRegex the regular expression to which this string is to be matched
@@ -1817,14 +1814,14 @@ public final class StringUtil {
* regular expression with the given pReplacement.
*
* An invocation of this method of the form
- * replaceAll(str, pRegex, repl)
+ * {@code replaceAll(str, pRegex, repl)}
* yields exactly the same result as the expression
*
- *
- * {@link Pattern}.{@link Pattern#compile(String) compile}(pRegex).
- * {@link Pattern#matcher matcher}(str{@code ).
- * {@link java.util.regex.Matcher#replaceAll replaceAll}(}repl{@code )}
- *
+ *
+ * {@link Pattern#compile(String) Pattern.compile(pRegex)}
+ * {@link Pattern#matcher .matcher(str)}
+ * {@link java.util.regex.Matcher#replaceAll .replaceAll(repl)}
+ *
*
* @param pString the string
* @param pRegex the regular expression to which this string is to be matched
@@ -1862,12 +1859,12 @@ public final class StringUtil {
*
*
* An invocation of this method of the form
- * split(str, regex, n)
+ * {@code split(str, regex, n)}
* yields the same result as the expression:
*
* {@link Pattern}.
- * {@link Pattern#compile(String) compile}(regex).
- * {@link Pattern#split(CharSequence,int) split}(str, n)
+ * {@link Pattern#compile(String) compile(regex)}.
+ * {@link Pattern#split(CharSequence,int) split(str, n)}
*
*
* @param pString the string