From e48d07389ea534bcf117a9c1c8023a5b309c64c5 Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:57:10 -0400 Subject: [PATCH] update protobuf engine to use buffered reader (#68) --- .../hhs/aspr/ms/taskit/protobuf/ProtobufTranslationEngine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/taskit/protobuf/ProtobufTranslationEngine.java b/protobuf/src/main/java/gov/hhs/aspr/ms/taskit/protobuf/ProtobufTranslationEngine.java index b71fa5d..ae2233d 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/taskit/protobuf/ProtobufTranslationEngine.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/taskit/protobuf/ProtobufTranslationEngine.java @@ -1,5 +1,6 @@ package gov.hhs.aspr.ms.taskit.protobuf; +import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; @@ -372,7 +373,7 @@ protected T readInput(Path path, Class inputClassRef) throws IOExcepti throw new ContractException(ProtobufCoreTranslationError.INVALID_READ_INPUT_CLASS_REF); } - return parseJson(new FileReader(path.toFile()), inputClassRef.asSubclass(Message.class)); + return parseJson(new BufferedReader(new FileReader(path.toFile())), inputClassRef.asSubclass(Message.class)); } /**