From 18efb25d413037fa9ff62b175c69895c099841b3 Mon Sep 17 00:00:00 2001 From: TheSilentCoder <184309164+ThatSilentCoder@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:49:40 -0400 Subject: [PATCH] issue_847: Figured out why tests were failing. CertificatePageControllerTest was trying to find the index of a curly brace inside the TPMSpecifications string but becauses lombok uses parens instead of curly braces for their toStrings, two tests kept failing. --- .../portal/page/utils/CertificateStringMapBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4b48537e..30d11444 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 @@ -466,8 +466,8 @@ public final class CertificateStringMapBuilder { */ private static HashMap convertStringToHash(final String str) { HashMap map = new HashMap<>(); - String name = str.substring(0, str.indexOf('{')).trim(); - String data = str.trim().substring(str.trim().indexOf('{') + 1, + String name = str.substring(0, str.indexOf('(')).trim(); + String data = str.trim().substring(str.trim().indexOf('(') + 1, str.trim().length() - 1); // Separate key and value and parse the key for (String pair : data.split(",")) {