Skip to content

Commit 15e56dc

Browse files
authored
Fix some Javadoc warnings in Java 21 (#12295)
Signed-off-by: Jakub Scholz <www@scholzj.com>
1 parent aba1ff6 commit 15e56dc

File tree

115 files changed

+1098
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1098
-59
lines changed

.checkstyle/checkstyle.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
<module name="JavadocMissingLeadingAsterisk" />
165165
<module name="JavadocMissingWhitespaceAfterAsterisk" />
166166
<module name="JavadocStyle">
167+
<property name="checkEmptyJavadoc" value="true"/>
167168
<property name="checkFirstSentence" value="false"/>
168169
</module>
169170
<module name="NonEmptyAtclauseDescription"/>

.checkstyle/suppressions.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<suppress checks="(JavadocMethod|JavadocType|JavadocVariable|MissingJavadocType|MissingJavadocMethod)" files="api[/\\]src[/\\]main[/\\]java[/\\]io[/\\]strimzi[/\\].*"/>
4141

4242
<!-- The systemtest module is currently not ready or Javadoc checks-->
43-
<suppress checks="(JavadocMethod|JavadocType|JavadocVariable|MissingJavadocType|MissingJavadocMethod)" files="systemtest[/\\]src[/\\]main[/\\]java[/\\]io[/\\]strimzi[/\\].*"/>
43+
<suppress checks="(JavadocMethod|JavadocType|JavadocVariable|MissingJavadocType|MissingJavadocMethod|JavadocStyle)" files="systemtest[/\\]src[/\\]main[/\\]java[/\\]io[/\\]strimzi[/\\].*"/>
44+
<suppress checks="(JavadocStyle)" files="systemtest[/\\]src[/\\]test[/\\]java[/\\]io[/\\]strimzi[/\\].*"/>
4445

4546
</suppressions>

api/src/main/java/io/strimzi/api/kafka/model/connector/AbstractConnectorSpec.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public abstract class AbstractConnectorSpec extends Spec {
5050
private AlterOffsets alterOffsets;
5151

5252
/**
53+
* Gets the maximum number of tasks.
54+
*
5355
* @return Max number of tasks
5456
*/
5557
@Description("The maximum number of tasks for the Kafka Connector")
@@ -68,6 +70,8 @@ public void setTasksMax(Integer tasksMax) {
6870
}
6971

7072
/**
73+
* Gets the version or version range for the Kafka Connector.
74+
*
7175
* @return Version or version range for the Kafka Connector
7276
*/
7377
@Description("Desired version or version range to respect when starting the Kafka Connector. This is only supported when using Kafka Connect version 4.1.0 and higher.")
@@ -86,6 +90,8 @@ public void setVersion(String version) {
8690
}
8791

8892
/**
93+
* Gets the Kafka Connector configuration.
94+
*
8995
* @return Connector configuration
9096
*/
9197
@Description("The Kafka Connector configuration. The following properties cannot be set: " + FORBIDDEN_PARAMETERS)
@@ -104,6 +110,8 @@ public void setConfig(Map<String, Object> config) {
104110
}
105111

106112
/**
113+
* Gets the flag indicating whether the connector should be paused.
114+
*
107115
* @return Flag indicating whether the connector should paused or not
108116
*/
109117
@Description("Whether the connector should be paused. Defaults to false.")
@@ -125,6 +133,8 @@ public void setPause(Boolean pause) {
125133
}
126134

127135
/**
136+
* Gets the auto-restart configuration of this connector.
137+
*
128138
* @return Auto-restart configuration of this connector
129139
*/
130140
@Description("Automatic restart of connector and tasks configuration")
@@ -143,6 +153,8 @@ public void setAutoRestart(AutoRestart autoRestart) {
143153
}
144154

145155
/**
156+
* Gets the state of the connector.
157+
*
146158
* @return The state of the connector
147159
*/
148160
@Description("The state the connector should be in. Defaults to running.")
@@ -160,6 +172,8 @@ public void setState(ConnectorState state) {
160172
}
161173

162174
/**
175+
* Gets the listOffsets configuration.
176+
*
163177
* @return The listOffsets configuration.
164178
*/
165179
@Description("Configuration for listing offsets")
@@ -177,6 +191,8 @@ public void setListOffsets(ListOffsets listOffsets) {
177191
}
178192

179193
/**
194+
* Gets the alterOffsets configuration.
195+
*
180196
* @return The alterOffsets configuration.
181197
*/
182198
@Description("Configuration for altering offsets")

api/src/main/java/io/strimzi/platform/PlatformFeatures.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@
99
*/
1010
public interface PlatformFeatures {
1111
/**
12+
* Gets the Kubernetes version on which Strimzi is running.
13+
*
1214
* @return Returns the Kubernetes version on which Strimzi is running.
1315
*/
1416
KubernetesVersion getKubernetesVersion();
1517

1618
/**
19+
* Checks if the cluster is OpenShift.
20+
*
1721
* @return Returns true if the cluster Strimzi is running on was identified as OpenShift and false otherwise.
1822
*/
1923
boolean isOpenshift();

certificate-manager/src/main/java/io/strimzi/certs/CertAndKey.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,69 +45,89 @@ public CertAndKey(byte[] key, byte[] cert, byte[] trustStore, byte[] keyStore, S
4545
}
4646

4747
/**
48+
* Gets the key as a byte array.
49+
*
4850
* @return The key as a byte array
4951
*/
5052
public byte[] key() {
5153
return key;
5254
}
5355

5456
/**
57+
* Gets the key as a base64 encoded String.
58+
*
5559
* @return The key as base64 encoded String
5660
*/
5761
public String keyAsBase64String() {
5862
return Base64.getEncoder().encodeToString(key());
5963
}
6064

6165
/**
66+
* Gets the certificate as a byte array.
67+
*
6268
* @return The cert as a byte array
6369
*/
6470
public byte[] cert() {
6571
return cert;
6672
}
6773

6874
/**
75+
* Gets the certificate as a base64 encoded String.
76+
*
6977
* @return The cert as base64 encoded String
7078
*/
7179
public String certAsBase64String() {
7280
return Base64.getEncoder().encodeToString(cert());
7381
}
7482

7583
/**
84+
* Gets the truststore as a byte array.
85+
*
7686
* @return The truststore as a byte array
7787
*/
7888
public byte[] trustStore() {
7989
return trustStore;
8090
}
8191

8292
/**
93+
* Gets the truststore as a base64 encoded String.
94+
*
8395
* @return The truststore as base64 encoded String
8496
*/
8597
public String trustStoreAsBase64String() {
8698
return Base64.getEncoder().encodeToString(trustStore());
8799
}
88100

89101
/**
102+
* Gets the keystore as a byte array.
103+
*
90104
* @return The keystore as a byte array
91105
*/
92106
public byte[] keyStore() {
93107
return keyStore;
94108
}
95109

96110
/**
111+
* Gets the keystore as a base64 encoded String.
112+
*
97113
* @return The keystore as base64 encoded String
98114
*/
99115
public String keyStoreAsBase64String() {
100116
return Base64.getEncoder().encodeToString(keyStore());
101117
}
102118

103119
/**
120+
* Gets the store password.
121+
*
104122
* @return The store password
105123
*/
106124
public String storePassword() {
107125
return storePassword;
108126
}
109127

110128
/**
129+
* Gets the store password as a base64 encoded String.
130+
*
111131
* @return The store password as base64 encoded String
112132
*/
113133
public String storePasswordAsBase64String() {

certificate-manager/src/main/java/io/strimzi/certs/Subject.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ public Subject.Builder addIpAddress(String ip) {
116116
}
117117

118118
/**
119+
* Builds and returns a new Subject instance based on this builder configuration.
120+
*
119121
* @return Instance of the Subject class created based on this builder
120122
*/
121123
public Subject build() {
@@ -142,6 +144,8 @@ private Subject(
142144
}
143145

144146
/**
147+
* Gets the organization name.
148+
*
145149
* @return Organization name
146150
*/
147151
@JsonProperty
@@ -150,6 +154,8 @@ public String organizationName() {
150154
}
151155

152156
/**
157+
* Gets the common name.
158+
*
153159
* @return Common name
154160
*/
155161
@JsonProperty
@@ -158,6 +164,8 @@ public String commonName() {
158164
}
159165

160166
/**
167+
* Gets the X500Principal based on this subject.
168+
*
161169
* @return X500Principal based on this subject
162170
*/
163171
public X500Principal principal() {
@@ -177,6 +185,8 @@ public X500Principal principal() {
177185
}
178186

179187
/**
188+
* Gets the set of DNS names.
189+
*
180190
* @return Set of DNS names
181191
*/
182192
@JsonProperty
@@ -185,6 +195,8 @@ public Set<String> dnsNames() {
185195
}
186196

187197
/**
198+
* Gets the set of IP addresses.
199+
*
188200
* @return Set of IP addresses
189201
*/
190202
@JsonProperty
@@ -219,6 +231,8 @@ public String toString() {
219231
}
220232

221233
/**
234+
* Gets the map with the Subject Alternative Names (SANs).
235+
*
222236
* @return Map with the SANs
223237
*/
224238
public Map<String, String> subjectAltNames() {
@@ -235,13 +249,17 @@ public Map<String, String> subjectAltNames() {
235249
}
236250

237251
/**
252+
* Checks if any SANs are present in this subject.
253+
*
238254
* @return True if any SANs are present. False otherwise.
239255
*/
240256
public boolean hasSubjectAltNames() {
241257
return !dnsNames().isEmpty() || !ipAddresses().isEmpty();
242258
}
243259

244260
/**
261+
* Gets the Distinguished Name (DN) in the format understood by OpenSSL.
262+
*
245263
* @return The DN in the format understood by {@code openssl}.
246264
*/
247265
public String opensslDn() {

0 commit comments

Comments
 (0)