Skip to content

Commit

Permalink
Making objectmapper a class variable as its threadsafe and can be reused
Browse files Browse the repository at this point in the history
  • Loading branch information
singh-sukhvir committed Sep 11, 2024
1 parent 6a3ded8 commit 5895453
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public class VertexTaxCalculator extends PluginTaxCalculator {
public static final String KB_TRANSACTION_PREFIX = "kb_";

private static final Logger logger = LoggerFactory.getLogger(VertexTaxCalculator.class);
private static final ObjectMapper objectMapper = new ObjectMapper();

private final VertexApiConfigurationHandler vertexApiConfigurationHandler;
private final VertexDao dao;
Expand Down Expand Up @@ -362,7 +363,6 @@ private InvoiceItem createTaxInvoiceItem(final InvoiceItem taxableItem, final UU

private String appendItemDetails(@Nullable final String itemDetails, @Nonnull final Map<String, Object> additionalDetails) {
ObjectNode existingItemsDetailsJson = null;
final ObjectMapper objectMapper = new ObjectMapper();

if (itemDetails != null && !itemDetails.isEmpty()) {
try {
Expand Down

0 comments on commit 5895453

Please sign in to comment.