From f263d2bb89b64617d657653defc71c9e29d43f8a Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 6 Aug 2024 12:55:44 +0300 Subject: [PATCH] Fix getremappedStandardType method --- .../java/org/verapdf/gf/model/impl/pd/GFPDStructElem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/pd/GFPDStructElem.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/pd/GFPDStructElem.java index d0704db92..14f3d1f70 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/pd/GFPDStructElem.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/pd/GFPDStructElem.java @@ -164,13 +164,13 @@ public String getremappedStandardType() { if (type == null) { return null; } - if (!Objects.equals(type.getType(), standardStructureType.getType()) || + if (standardStructureType == null || !Objects.equals(type.getType(), standardStructureType.getType()) || !Objects.equals(type.getNameSpaceURI(), standardStructureType.getNameSpaceURI())) { return type.getType().getValue(); } } else if (standardType != null) { StructureType standardTypeMap = org.verapdf.pd.structure.PDStructElem.getStructureTypeStandardStructureType(standardStructureType); - if (!Objects.equals(standardTypeMap.getType(), standardStructureType.getType()) || + if (standardTypeMap == null || !Objects.equals(standardTypeMap.getType(), standardStructureType.getType()) || !Objects.equals(standardTypeMap.getNameSpaceURI(), standardStructureType.getNameSpaceURI())) { return standardType; }