From 1135e97c6e68d6649ec8b314883d7dd47401393c Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 6 Aug 2024 15:09:52 +0300 Subject: [PATCH] Fix getStructureTypeStandardStructureType --- src/main/java/org/verapdf/pd/structure/PDStructElem.java | 4 ++-- src/main/java/org/verapdf/pd/structure/StructureType.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/verapdf/pd/structure/PDStructElem.java b/src/main/java/org/verapdf/pd/structure/PDStructElem.java index 9332e999..a5ae979f 100644 --- a/src/main/java/org/verapdf/pd/structure/PDStructElem.java +++ b/src/main/java/org/verapdf/pd/structure/PDStructElem.java @@ -137,8 +137,8 @@ public static StructureType getStructureTypeStandardStructureType(StructureType } if (!PDFFlavour.isFlavourPDFSpecification(flavour, PDFFlavour.PDFSpecification.ISO_32000_2_0) || PDFFlavour.isFlavourFamily(flavour, PDFFlavour.SpecificationFamily.WCAG)) { if (type != null) { - return StructureType.createStructureType(ASAtom.getASAtom( - StaticResources.getRoleMapHelper().getStandardType(type.getType()))); + return new StructureType(ASAtom.getASAtom( + StaticResources.getRoleMapHelper().getStandardType(type.getType())), type.getNameSpace()); } } return null; diff --git a/src/main/java/org/verapdf/pd/structure/StructureType.java b/src/main/java/org/verapdf/pd/structure/StructureType.java index 8d54f776..709f7e8f 100644 --- a/src/main/java/org/verapdf/pd/structure/StructureType.java +++ b/src/main/java/org/verapdf/pd/structure/StructureType.java @@ -32,7 +32,7 @@ public class StructureType { private final ASAtom type; private final PDStructureNameSpace nameSpace; - private StructureType(ASAtom type, PDStructureNameSpace nameSpace) { + public StructureType(ASAtom type, PDStructureNameSpace nameSpace) { this.type = type; this.nameSpace = nameSpace; }