Skip to content

Commit

Permalink
Update maps in ASAtoms to synchronized maps
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Nov 15, 2024
1 parent b6e14aa commit 2fd9eff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/verapdf/as/ASAtom.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import org.verapdf.cos.filters.COSFilterASCIIHexEncode;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
Expand All @@ -34,8 +35,8 @@
*/
public class ASAtom implements Comparable<ASAtom> {

private static final Map<String, ASAtom> PREDEFINED_PDF_NAMES = new HashMap<>();
private static final Map<String, ASAtom> CACHED_PDF_NAMES = new HashMap<>();
private static final Map<String, ASAtom> PREDEFINED_PDF_NAMES = Collections.synchronizedMap(new HashMap<>());
private static final Map<String, ASAtom> CACHED_PDF_NAMES = Collections.synchronizedMap(new HashMap<>());

// 3
public static final ASAtom key3D = new ASAtom("3D");
Expand Down

0 comments on commit 2fd9eff

Please sign in to comment.