Skip to content

Commit 85a4148

Browse files
committed
Delombok TrustRootsResult builder JavaDoc
As of version 1.18.24, Lombok fails to copy JavaDoc from the source definition to generated methods in a static inner class.
1 parent b512f9a commit 85a4148

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Fixes:
3636
* Moved version constraints for test dependencies from meta-module
3737
`webauthn-server-parent` to unpublished test meta-module.
3838
* `yubico-util` dependency removed from downstream compile scope.
39+
* Fixed missing JavaDoc on `TrustRootsResult` getters and builder setters.
3940

4041

4142
`webauthn-server-attestation`:

webauthn-server-core/src/main/java/com/yubico/webauthn/attestation/AttestationTrustSource.java

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,100 @@ public TrustRootsResultBuilder trustRoots(@NonNull Set<X509Certificate> trustRoo
198198
return new TrustRootsResultBuilder().trustRoots(trustRoots);
199199
}
200200
}
201+
202+
/**
203+
* A set of attestation root certificates trusted to certify the relevant attestation
204+
* statement. If the attestation statement is not trusted, or if no trust roots were found,
205+
* this should be an empty set.
206+
*/
207+
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
208+
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder trustRoots(
209+
@NonNull final Set<X509Certificate> trustRoots) {
210+
if (trustRoots == null) {
211+
throw new java.lang.NullPointerException("trustRoots is marked non-null but is null");
212+
}
213+
this.trustRoots = trustRoots;
214+
return this;
215+
}
216+
217+
/**
218+
* A {@link CertStore} of additional CRLs and/or intermediate certificates to use during
219+
* certificate path validation, if any. This will not be used if {@link
220+
* TrustRootsResultBuilder#trustRoots(Set) trustRoots} is empty.
221+
*
222+
* <p>Any certificates included in this {@link CertStore} are NOT considered trusted; they
223+
* will be trusted only if they chain to any of the {@link
224+
* TrustRootsResultBuilder#trustRoots(Set) trustRoots}.
225+
*
226+
* <p>The default is <code>null</code>.
227+
*/
228+
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
229+
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder certStore(
230+
final CertStore certStore) {
231+
this.certStore$value = certStore;
232+
certStore$set = true;
233+
return this;
234+
}
235+
236+
/**
237+
* Whether certificate revocation should be checked during certificate path validation.
238+
*
239+
* <p>The default is <code>true</code>.
240+
*/
241+
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
242+
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder
243+
enableRevocationChecking(final boolean enableRevocationChecking) {
244+
this.enableRevocationChecking$value = enableRevocationChecking;
245+
enableRevocationChecking$set = true;
246+
return this;
247+
}
248+
249+
/**
250+
* If non-null, the PolicyQualifiersRejected flag will be set to false during certificate path
251+
* validation. See {@link
252+
* java.security.cert.PKIXParameters#setPolicyQualifiersRejected(boolean)}.
253+
*
254+
* <p>The given {@link Predicate} will be used to validate the policy tree. The {@link
255+
* Predicate} should return <code>true</code> if the policy tree is acceptable, and <code>
256+
* false
257+
* </code> otherwise.
258+
*
259+
* <p>Depending on your <code>"PKIX"</code> JCA provider configuration, this may be required
260+
* if any certificate in the certificate path contains a certificate policies extension marked
261+
* critical. If this is not set, then such a certificate will be rejected by the certificate
262+
* path validator from the default provider.
263+
*
264+
* <p>Consult the <a
265+
* href="https://docs.oracle.com/en/java/javase/17/security/java-pki-programmers-guide.html#GUID-3AD41382-E729-469B-83EE-CB2FE66D71D8">Java
266+
* PKI Programmer's Guide</a> for how to use the {@link PolicyNode} argument of the {@link
267+
* Predicate}.
268+
*
269+
* <p>The default is <code>null</code>.
270+
*/
271+
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
272+
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder policyTreeValidator(
273+
final Predicate<PolicyNode> policyTreeValidator) {
274+
this.policyTreeValidator$value = policyTreeValidator;
275+
policyTreeValidator$set = true;
276+
return this;
277+
}
278+
}
279+
280+
/**
281+
* A set of attestation root certificates trusted to certify the relevant attestation statement.
282+
* If the attestation statement is not trusted, or if no trust roots were found, this should be
283+
* an empty set.
284+
*/
285+
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
286+
@NonNull
287+
public Set<X509Certificate> getTrustRoots() {
288+
return this.trustRoots;
289+
}
290+
291+
/** Whether certificate revocation should be checked during certificate path validation. */
292+
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
293+
public boolean isEnableRevocationChecking() {
294+
return this.enableRevocationChecking;
201295
}
202296
}
203297
}

0 commit comments

Comments
 (0)