Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/verapdf/pd/structure/PDStructElem.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ public StructureType getDefaultStructureType() {
}

public static StructureType getDefaultStructureType(StructureType structureType) {
return TaggedPDFHelper.getDefaultStructureType(structureType);
return new TaggedPDFHelper().getDefaultStructureType(structureType);
}

public String getRoleMapToSameNamespaceTag() {
return TaggedPDFHelper.getRoleMapToSameNamespaceTag(getStructureType());
return new TaggedPDFHelper().getRoleMapToSameNamespaceTag(getStructureType());
}

public static StructureType getStructureElementStandardStructureType(PDStructElem pdStructElem) {
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/verapdf/tools/TaggedPDFHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ public class TaggedPDFHelper {
// TaggedPDFConstants.TR));

private static final int MAX_NUMBER_OF_ELEMENTS = 1;
private static final Map<ASAtom, Set<COSKey>> visitedWithNS = new HashMap<>();
private static final Set<ASAtom> visitedWithoutNS = new HashSet<>();
private final Map<ASAtom, Set<COSKey>> visitedWithNS = new HashMap<>();
private final Set<ASAtom> visitedWithoutNS = new HashSet<>();

private TaggedPDFHelper() {
public TaggedPDFHelper() {
// disable default constructor
}

public static StructureType getDefaultStructureType(StructureType type) {
public StructureType getDefaultStructureType(StructureType type) {
if (type == null) {
return null;
}
Expand All @@ -193,7 +193,7 @@ public static StructureType getDefaultStructureType(StructureType type) {
return null;
}

public static String getRoleMapToSameNamespaceTag(StructureType type) {
public String getRoleMapToSameNamespaceTag(StructureType type) {
if (type == null) {
return null;
}
Expand Down Expand Up @@ -224,7 +224,7 @@ public static String getRoleMapToSameNamespaceTag(StructureType type) {
return null;
}

public static Boolean isCircularMappingExist(StructureType type) {
public Boolean isCircularMappingExist(StructureType type) {
if (type == null) {
return null;
}
Expand Down Expand Up @@ -288,7 +288,7 @@ public static boolean isStandardType(StructureType type) {
}
}

private static void addVisited(StructureType type) {
private void addVisited(StructureType type) {
ASAtom structType = type.getType();
PDStructureNameSpace nameSpace = type.getNameSpace();
if (nameSpace != null) {
Expand All @@ -306,7 +306,7 @@ private static void addVisited(StructureType type) {
}
}

private static boolean isVisited(StructureType type) {
private boolean isVisited(StructureType type) {
ASAtom structType = type.getType();
PDStructureNameSpace nameSpace = type.getNameSpace();
if (nameSpace != null) {
Expand Down
Loading