Skip to content

Commit

Permalink
Fix javadoc syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ties committed Apr 8, 2024
1 parent 32f1b46 commit 3e51d30
Show file tree
Hide file tree
Showing 22 changed files with 58 additions and 63 deletions.
16 changes: 13 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,21 @@
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</execution>
</executions>
<configuration>
<doclint>all,-missing</doclint>
<tags>
<tag>
<name>requires</name>
<placement>a</placement>
</tag>
<tag>
<name>ensures</name>
<placement>a</placement>
</tag>
</tags>
</configuration>
</plugin>

<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class SigningInformationUtil {
* of these attributes SHOULD be present". [..] "However, if both of these attributes are present,
* they MUST provide the same date and time."
*
* @ensures res.valid && all signing time attributes have a single value && all signing time values have the same value
* @ensures res.valid &amp;&amp; all signing time attributes have a single value &amp;&amp; all signing time values have the same value
*/
public static SigningTimeResult extractSigningTime(ValidationResult validationResult, SignerInformation signer) {
ImmutablePair<DateTime, Boolean> signingTime = extractTime(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/**
* A manifest of files published by a CA certificate.
* <p/>
*
* Use the {@link ManifestCmsBuilder} or {@link ManifestCmsParser} to construct this object.
*/
public class ManifestCms extends RpkiSignedObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import static net.ripe.rpki.commons.validation.ValidationString.*;

/**
* @See {@link http://tools.ietf.org/html/draft-ietf-sidr-rpki-manifests-07}
* @see <a href="https://datatracker.ietf.org/doc/rfc9286/">RFC9286</a>
*/

public class ManifestCmsParser extends RpkiSignedObjectParser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ASN1Object encodeRoaIpAddress(RoaPrefix prefix) {
}

/**
* Encode the <emph>unique</emph> (Set) roa-prefixes with the given addressFamily <b>in deterministic order</b>
* Encode the <b>unique</b> (Set) roa-prefixes with the given addressFamily <b>in deterministic order</b>
*
* <pre>
* ROAIPAddressFamily ::= SEQUENCE {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public IpRange getPrefix() {

/**
* Return the maximum length as specified in the structure of the ROA.
* <emph>Needed to exactly represent a decoded ROA.</emph> When consuming these objects, use {@link #getEffectiveMaximumLength()} where possible.
* <b>Needed to exactly represent a decoded ROA.</b> When consuming these objects, use {@link #getEffectiveMaximumLength()} where possible.
*/
public Integer getMaximumLength() {
return maximumLength;
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/net/ripe/rpki/commons/crypto/crl/X509Crl.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public URI getCrlUri() {
* This method is required by the interface, but should never be called
* on X509Crl objects.. it's pointless. They don't have an AIA.
*
* @throws: {@link UnsupportedOperationException}
* @throws UnsupportedOperationException
*/
@Override
public URI getParentCertificateUri() {
Expand All @@ -225,13 +225,7 @@ public URI getParentCertificateUri() {
public void verify(PublicKey publicKey) throws SignatureException {
try {
getCrl().verify(publicKey, DEFAULT_SIGNATURE_PROVIDER);
} catch (InvalidKeyException e) {
throw new IllegalArgumentException(e);
} catch (CRLException e) {
throw new IllegalArgumentException(e);
} catch (NoSuchAlgorithmException e) {
throw new IllegalArgumentException(e);
} catch (NoSuchProviderException e) {
} catch (InvalidKeyException | CRLException | NoSuchAlgorithmException | NoSuchProviderException e) {
throw new IllegalArgumentException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import java.util.Objects;

/**
* See {@link http://www.ietf.org/rfc/rfc3779.txt},
* {@link http://www.iana.org/assignments/address-family-numbers} and
* {@link http://www.iana.org/assignments/safi-namespace}.
* See <a href="https://www.ietf.org/rfc/rfc3779.txt">RFC3779</a>,
* <a href="https://www.iana.org/assignments/address-family-numbers">The IANA Address Family Numbers registry</a>
* and https://www.iana.org/assignments/safi-namespace}.
*/
@Value
public class AddressFamily implements Comparable<AddressFamily>, Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* Encodes the certificate resource extensions as specified in RFC3779. Resource
* inheritance is not yet supported.
* <p/>
*
* The methods in this class are named after the grammar rules in RFC3779,
* suffixed with "ToDer".
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Parses the certificate resource extensions as specified in RFC3779. Resource
* inheritance is not yet supported.
* <p/>
*
* The methods in this class are named after the grammar rules in RFC3779,
* prefixed with "derTo".
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@
@UtilityClass
public class SignedObjectUtil {
/**
* Extract the creation time from an object. This does <emph>not yet</emph> follow the method described in
* https://datatracker.ietf.org/doc/draft-timbru-sidrops-publication-server-bcp/00/. It differs in that it uses
* the signing time for RPKI signed objects. This is a trade-off:
* * signing-time is more correct when multi-use EE certificates are present.
* * signing-time likely does not match the modification time of the CRL.
*
* This needs to be revisited in 2024.
* Extract the creation time from an object. This uses the signing time for RPKI signed objects with fallback
* to notBefore if that is not present.
*
* @param uri URL of the object
* @param decoded object bytes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/**
* Fairly generic helper for X509CertificateBuilders. Intended to be used by
* (delegated to, not extended) specific certificate builders.
* <p/>
*
* Because we want to maintain the pattern where a specific Certificate builder
* can be chained like: builder.withValidity(val).withSubjectDn(subject) etc...
* dynamic typing would be required.. hence delegation.
Expand All @@ -61,7 +61,6 @@
* (@see X509CertificateBuilderHelper.validateResource)
* which results in an inevitable runtime check. Thus moving resource setting
* into a separate resource-specialised builder doesn't make sense.
*
*/
public final class X509CertificateBuilderHelper {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.ripe.rpki.commons.provisioning.payload;

import lombok.Setter;
import net.ripe.rpki.commons.util.EqualsSupport;

public abstract class AbstractProvisioningPayload extends EqualsSupport {
Expand All @@ -11,8 +12,26 @@ public abstract class AbstractProvisioningPayload extends EqualsSupport {

private Integer version;

/**
* -- SETTER --
* Note: This field is used by some implementations to work out who the players
* are in an exchange of ProvisioningCmsObjects. (eg APNIC). This setter is
* provided to make it easier to set this value 'close' to your code that deals
* with this actual exchange, as opposed to the code that deals with the other
* 'content' of the payload.
*/
@Setter
private String sender = DEFAULT_SENDER;

/**
* -- SETTER --
* Note: This field is used by some implementations to work out who the players
* are in an exchange of ProvisioningCmsObjects. (eg APNIC). This setter is
* provided to make it easier to set this value 'close' to your code that deals
* with this actual exchange, as opposed to the code that deals with the other
* 'content' of the payload.
*/
@Setter
private String recipient = DEFAULT_RECIPIENT;

private PayloadMessageType type;
Expand All @@ -26,28 +45,6 @@ protected AbstractProvisioningPayload(Integer version, PayloadMessageType type)
this.type = type;
}

/**
* Note: This field is used by some implementations to work out who the players
* are in an exchange of ProvisioningCmsObjects. (eg APNIC). This setter is
* provided to make it easier to set this value 'close' to your code that deals
* with this actual exchange, as opposed to the code that deals with the other
* 'content' of the payload.
*/
public void setRecipient(String recipient) {
this.recipient = recipient;
}

/**
* Note: This field is used by some implementations to work out who the players
* are in an exchange of ProvisioningCmsObjects. (eg APNIC). This setter is
* provided to make it easier to set this value 'close' to your code that deals
* with this actual exchange, as opposed to the code that deals with the other
* 'content' of the payload.
*/
public void setSender(String sender) {
this.sender = sender;
}

public Integer getVersion() {
return version;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* See: http://tools.ietf.org/html/draft-ietf-sidr-rescerts-provisioning-09#section-3.4.2
* <p/>
*
* This type of class element contains the signed certificate for this request/response
* as oposed to all current certificate elements as used in the list response.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* See: http://tools.ietf.org/html/draft-ietf-sidr-rescerts-provisioning-09#section-3.3.2
* <p/>
*
* This type of class element contains a current certificate element for each key pair,
* as opposed to just one in the CertificateIssuanceResponse.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public ProvisioningCmsCertificateBuilder withSigningKeyPair(KeyPair signingKey)
}

/**
* Override the <emph>default</emph> validity period of this EE certificate.
* Override the <b>default</b> validity period of this EE certificate.
*/
public ProvisioningCmsCertificateBuilder withValidityPeriod(ValidityPeriod validityPeriod) {
builderHelper.withValidityPeriod(validityPeriod);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public ProvisioningIdentityCertificateBuilder withSelfSigningSubject(X500Princip
}

/**
* Only call this if you need to use a special signature provider, eg for HSM. Leave to use default otherwise
* Set a specific signature provider (from a java crypto provider), e.g. for HSM.
*
* @see X509CertificateBuilderHelper.DEFAULT_SIGNATURE_PROVIDER
* Defaults to {@link net.ripe.rpki.commons.crypto.x509cert.X509CertificateBuilderHelper#DEFAULT_SIGNATURE_PROVIDER}.
*/
public ProvisioningIdentityCertificateBuilder withSignatureProvider(String signatureProvider) {
this.signatureProvider = signatureProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public interface RoaPrefixData extends Comparable<RoaPrefixData> {
Asn getAsn();

/**
* @return The prefix of the entity. <emph>MUST</emph> be a prefix and not a IP range
* @return The prefix of the entity. <b>MUST</b> be a prefix and not a IP range
*/
IpRange getPrefix();

/**
* @return The maximum length of the VRP. The maximum length <emph>MUST</emph> be in the range (inclusive) between
* @return The maximum length of the VRP. The maximum length <b>MUST</b> be in the range (inclusive) between
* the prefix length and the length of addresses for the address family.
*/
int getMaximumLength();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface RouteData extends Comparable<RouteData> {
Asn getOriginAsn();

/**
* @return The prefix of the entity. <emph>MUST</emph> be a prefix and not a IP range
* @return The prefix of the entity. <b>MUST</b> be a prefix and not a IP range
*/
IpRange getPrefix();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static <C> XStreamXmlSerializerBuilder<C> newForgivingXmlSerializerBuilde
* * The type the serializer is built for.
* * Types that have been aliased (i.e. the mapped name of the class is not it's qualified name).
*
* Note that the allowlist is <emph>only</emph> checked on deserialization.
* Note that the allowlist is <b>only</b> checked on deserialization.
*/
private void createDefaultXStream(boolean strict) {
if(strict) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void should_accept_apnic_test_aspa_v1() throws IOException {
}

/**
* draft 15 mentions <emph>implicit</emph> tags by accident, this was changed without a OID change later.
* draft 15 mentions <b>implicit</b> tags by accident, this was changed without a OID change later.
*/
@Test
void should_reject_draft15_rpki_commons_with_implicit_tag() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void shouldParseRoaWithNoSignerInfo() throws IOException {
/**
* Apply a number of test cases for version.
*
* Note that in these objects version is <emph>implicit</emph> not <emph>explicit</emph> as required.
* Note that in these objects version is <b>implicit</b> not <b>explicit</b> as required.
*/
@CsvSource({
"557, VersionV1Explicit, # explicit V1 version (int 0) applied before signature 6482#3",
Expand Down

0 comments on commit 3e51d30

Please sign in to comment.