From 7a7385f24018f74140b2558069f04d21440aecdd Mon Sep 17 00:00:00 2001 From: TheSilentCoder <184309164+ThatSilentCoder@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:54:50 -0400 Subject: [PATCH] Finished fixing all checkstyle errors. Now figuring out this dependency issue. --- .../provision/CertificateRequestProcessor.java | 2 +- .../hirs/attestationca/portal/HIRSApplication.java | 5 ++++- .../attestationca/portal/PersistenceJPAConfig.java | 8 ++++++-- .../datatables/OrderedListQueryDataTableAdapter.java | 9 ++++++--- .../page/utils/CertificateStringMapBuilder.java | 8 +++++--- config/checkstyle/suppressions.xml | 12 ++++++++---- 6 files changed, 30 insertions(+), 14 deletions(-) diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/CertificateRequestProcessor.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/CertificateRequestProcessor.java index 15d37795d..23c39cb13 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/CertificateRequestProcessor.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/CertificateRequestProcessor.java @@ -191,7 +191,7 @@ public byte[] processCertificateRequest(final byte[] certificateRequest) { attestationCertificate); String pemEncodedAttestationCertificate = ProvisionUtils.getPemEncodedCertificate( attestationCertificate); - + // We validated the nonce and made use of the identity claim so state can be deleted tpm2ProvisionerStateRepository.delete(tpm2ProvisionerState); diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java index 068339457..29cc4b851 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java @@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +@SuppressWarnings("checkstyle:hideutilityclassconstructor") @SpringBootApplication //@EnableAutoConfiguration @Log4j2 @@ -24,7 +25,9 @@ public class HIRSApplication { // } /** - * @param args + * This is the starting point of the HIRS application. + * + * @param args main method arguments */ public static void main(final String[] args) { // SpringApplication springApplication = new SpringApplication(HIRSApplication.class); diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/PersistenceJPAConfig.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/PersistenceJPAConfig.java index ae02253ea..36ce7d069 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/PersistenceJPAConfig.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/PersistenceJPAConfig.java @@ -224,7 +224,9 @@ public KeyStore keyStore() { } /** - * @return + * Platform Transaction Manager bean. + * + * @return platform transaction manager bean */ @Bean public PlatformTransactionManager transactionManager() { @@ -234,7 +236,9 @@ public PlatformTransactionManager transactionManager() { } /** - * @return + * Persistence Exception Translation Post Processor bean. + * + * @return persistence exception translation post processor bean */ @Bean public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java index 661397f14..160fb169e 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java @@ -5,8 +5,6 @@ import hirs.attestationca.persist.entity.userdefined.rim.ReferenceDigestValue; import jakarta.persistence.EntityManager; import jakarta.persistence.criteria.CriteriaQuery; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.util.CollectionUtils; @@ -23,10 +21,15 @@ * * @param The type of object to query */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) @Log4j2 public final class OrderedListQueryDataTableAdapter { + /** + * Private constructor was created to silence checkstyle error. + */ + private OrderedListQueryDataTableAdapter() { + } + /** * Gets the ordered list of records using a default, no-op criteria modifier. * diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java index 09ea707c4..4b48537e8 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java @@ -15,8 +15,6 @@ import hirs.attestationca.persist.util.AcaPciIds; import hirs.utils.BouncyCastleUtils; import hirs.utils.PciIds; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; import lombok.extern.log4j.Log4j2; import org.bouncycastle.util.encoders.Hex; @@ -36,8 +34,12 @@ * information on a web page, as X509 cert classes do not serialize to JSON */ @Log4j2 -@NoArgsConstructor(access = AccessLevel.PRIVATE) public final class CertificateStringMapBuilder { + /** + * This private constructor was created to silence checkstyle error. + */ + private CertificateStringMapBuilder() { + } /** * Returns the general information. diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml index f0a4b4420..31e31c3e1 100644 --- a/config/checkstyle/suppressions.xml +++ b/config/checkstyle/suppressions.xml @@ -6,11 +6,15 @@ - - + + - - + + + + + + \ No newline at end of file