Skip to content

Commit 079a384

Browse files
committed
replace HTML JavaDoc with Markdown and enable -Xlintdoc
1 parent e13c50b commit 079a384

13 files changed

Lines changed: 38 additions & 78 deletions

File tree

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ subprojects {
7373
options.compilerArgs.add("-Xlint:deprecation,removal,unchecked,cast,rawtypes,divzero,this-escape,identity,text-blocks,dangling-doc-comments,restricted")
7474
// The build itself: command-line options, path entries, output file collisions
7575
options.compilerArgs.add("-Xlint:options,path,output-file-clash")
76+
// Javadoc comments: no group repeats an Error Prone check, and `missing` floods on generated code
77+
options.compilerArgs.add("-Xdoclint:all,-missing")
7678

7779
options.errorprone {
7880
// The checks live in errorprone.args, see https://github.com/tbroyer/gradle-errorprone-plugin#argument-files

operator/src/main/java/it/aboutbits/postgresql/PostgreSQLInstanceReadinessCheck.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
import org.eclipse.microprofile.health.Readiness;
1111
import org.jspecify.annotations.NullMarked;
1212

13-
/**
14-
* MicroProfile readiness health check that verifies connectivity to all
15-
* configured PostgreSQL instances. Each instance is probed with a lightweight
16-
* operation, and the aggregated status is exposed.
17-
*/
13+
/// MicroProfile readiness health check that verifies connectivity to all configured PostgreSQL instances.
14+
/// Each instance is probed with a lightweight operation, and the aggregated status is exposed.
1815
@Readiness
1916
@RequiredArgsConstructor
2017
@NullMarked

operator/src/main/java/it/aboutbits/postgresql/core/CRStatus.java

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,39 @@
1010
import java.time.OffsetDateTime;
1111
import java.time.ZoneOffset;
1212

13-
/**
14-
* Status Object for the Custom Resources.
15-
* <p>
16-
* This object captures the current state of a Custom Resource as observed by the reconciler.
17-
*/
13+
/// Status Object for the Custom Resources.
14+
///
15+
/// This object captures the current state of a Custom Resource as observed by the reconciler.
1816
@Getter
1917
@Setter
2018
@Accessors(chain = true)
2119
@NullMarked
2220
public class CRStatus {
23-
/**
24-
* The Custom Resource name (may differ from metadata.name).
25-
*/
21+
/// The Custom Resource name (may differ from `metadata.name`).
2622
private @Nullable String name = null;
2723

28-
/**
29-
* Current lifecycle phase of the Bucket.
30-
*/
24+
/// Current lifecycle phase of the CR.
3125
@Setter(AccessLevel.NONE)
3226
private CRPhase phase = CRPhase.PENDING;
3327

34-
/**
35-
* Human-readable message providing details about the current state.
36-
*/
28+
/// Human-readable message providing details about the current state.
3729
private @Nullable String message = null;
3830

39-
/**
40-
* Last time the condition was probed/updated.
41-
*/
31+
/// Last time the condition was probed/updated.
4232
private @Nullable OffsetDateTime lastProbeTime = null;
4333

44-
/**
45-
* Last time the condition transitioned from one status to another.
46-
*/
34+
/// Last time the condition transitioned from one status to another.
4735
@Setter(AccessLevel.NONE)
4836
private @Nullable OffsetDateTime lastPhaseTransitionTime = null;
4937

50-
/**
51-
* Observed resource generation that the controller acted upon.
52-
*/
38+
/// Observed resource generation that the controller acted upon.
5339
private long observedGeneration = 0;
5440

55-
/**
56-
* Update the current phase. When the phase changes, the {@link #lastPhaseTransitionTime}
57-
* is updated to the current UTC time and the message is set to {@code null}.
58-
*
59-
* @param newPhase the new phase
60-
* @return this status instance
61-
*/
41+
/// Update the current phase. When the phase changes, the [#lastPhaseTransitionTime]
42+
/// is updated to the current UTC time and the message is set to `null`.
43+
///
44+
/// @param newPhase the new phase
45+
/// @return this status instance
6246
public CRStatus setPhase(CRPhase newPhase) {
6347
if (this.phase == newPhase) {
6448
return this;

operator/src/main/java/it/aboutbits/postgresql/core/Privilege.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010

1111
import java.util.Locale;
1212

13-
/**
14-
* <a href="https://www.postgresql.org/docs/current/sql-grant.html">
15-
* https://www.postgresql.org/docs/current/sql-grant.html
16-
* </a>
17-
*/
13+
/// [PostgreSQL: Documentation: GRANT](https://www.postgresql.org/docs/current/sql-grant.html)
1814
@Getter
1915
@Accessors(fluent = true)
2016
@RequiredArgsConstructor

operator/src/main/java/it/aboutbits/postgresql/core/SQLUtil.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ public static QueryPart concatenateQueryPartsWithComma(List<? extends QueryPart>
1717
return concatenateQueryParts(parts, ", ");
1818
}
1919

20-
/**
21-
* Concatenate QueryParts with the requested separator
22-
*/
20+
/// Concatenate [QueryPart]s with the requested separator
2321
private static QueryPart concatenateQueryParts(
2422
List<? extends QueryPart> items,
2523
String separator

operator/src/main/java/it/aboutbits/postgresql/crd/database/DatabaseSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class DatabaseSpec {
2727
)
2828
private String name = "";
2929

30-
/// Whether the database should be retained or deleted when the Database CR instance is deleted.
30+
/// Whether the database should be retained or deleted when the [Database] CR instance is deleted.
3131
@io.fabric8.generator.annotation.Nullable
3232
private ReclaimPolicy reclaimPolicy = ReclaimPolicy.RETAIN;
3333

operator/src/main/java/it/aboutbits/postgresql/crd/defaultprivilege/DefaultPrivilegeObjectType.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
import static it.aboutbits.postgresql.core.Privilege.USAGE;
2424
import static org.jooq.impl.DSL.keyword;
2525

26-
/**
27-
* <a href="https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html">
28-
* https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html
29-
* </a>
30-
*/
26+
/// [PostgreSQL: Documentation: ALTER DEFAULT PRIVILEGES](https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html)
3127
@Getter
3228
@Accessors(fluent = true)
3329
@NullMarked

operator/src/main/java/it/aboutbits/postgresql/crd/defaultprivilege/DefaultPrivilegeService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public class DefaultPrivilegeService {
3434

3535
/// Determines all existing default privileges for the specified `role`, `schema`, and the given `objectType`.
3636
///
37-
/// @param tx The DSLContext for database operations.
38-
/// @param spec The DefaultPrivilegeSpec containing the specification details.
39-
/// @return A set of Privilege as values.
37+
/// @param tx The [DSLContext] for database operations.
38+
/// @param spec The [DefaultPrivilegeSpec] containing the specification details.
39+
/// @return A set of [Privilege] as values.
4040
public Set<Privilege> determineCurrentDefaultPrivileges(
4141
DSLContext tx,
4242
DefaultPrivilegeSpec spec

operator/src/main/java/it/aboutbits/postgresql/crd/grant/GrantObjectType.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@
2525
import static it.aboutbits.postgresql.core.Privilege.USAGE;
2626
import static org.jooq.impl.DSL.keyword;
2727

28-
/**
29-
* <a href="https://www.postgresql.org/docs/current/sql-grant.html">
30-
* https://www.postgresql.org/docs/current/sql-grant.html
31-
* </a>
32-
*/
28+
/// [PostgreSQL: Documentation: GRANT](https://www.postgresql.org/docs/current/sql-grant.html)
3329
@Getter
3430
@Accessors(fluent = true)
3531
@NullMarked

operator/src/main/java/it/aboutbits/postgresql/crd/grant/GrantService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public class GrantService {
4242

4343
/// Determines all existing privileges for the specified `role`, when applicable `schema`, and the given `objectType`.
4444
///
45-
/// @param tx The DSLContext for database operations.
46-
/// @param spec The GrantSpec containing the specification details.
47-
/// @return A map with object names as keys and lists of Privilege as values.
45+
/// @param tx The [DSLContext] for database operations.
46+
/// @param spec The [GrantSpec] containing the specification details.
47+
/// @return A map with object names as keys and lists of [Privilege] as values.
4848
public Map<String, Set<Privilege>> determineCurrentObjectPrivileges(
4949
DSLContext tx,
5050
GrantSpec spec
@@ -211,8 +211,8 @@ public Map<String, Set<Privilege>> determineCurrentObjectPrivileges(
211211
/// If the `objects` List is empty, no condition is applied for object filtering,
212212
/// and thus all objects from this `namespace`/`schema` are returned.
213213
///
214-
/// @param tx the DSLContext used to execute database operations
215-
/// @param spec the GrantSpec object containing specifications about the target database objects and privileges
214+
/// @param tx the [DSLContext] used to execute database operations
215+
/// @param spec the [GrantSpec] object containing specifications about the target database objects and privileges
216216
/// @return a map where the keys represent object names and the values indicate ownership status,
217217
/// or `null` if the object does not exist
218218
@SuppressWarnings("java:S3776")

0 commit comments

Comments
 (0)