pvillard31 commented on code in PR #11083:
URL: https://github.com/apache/nifi/pull/11083#discussion_r3021947548


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestValidateJson.java:
##########
@@ -308,25 +278,19 @@ private static Stream<Arguments> multilineJsonArgs() {
     }
 
     private static String getFilePath(final String filename) {
-        final String path = getRelativeResourcePath(filename);
-        final URL url = 
Objects.requireNonNull(TestValidateJson.class.getResource(path), "Resource not 
found");
-        return url.getPath();
+        final Path path = RESOURCE_DIR.resolve(filename);
+        return path.toString();
     }
 
     private static String getFileContent(final String filename) {
-        final String path = getRelativeResourcePath(filename);
-        try (final InputStream inputStream = 
TestValidateJson.class.getResourceAsStream(path)) {
-            Objects.requireNonNull(inputStream, "Resource not found");
-            return IOUtils.toString(inputStream, StandardCharsets.UTF_8);
-        } catch (final IOException e) {
+        final Path path = RESOURCE_DIR.resolve(filename);
+        try {
+            return Files.readString(path);
+        } catch (IOException e) {

Review Comment:
   ```suggestion
           } catch (final IOException e) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to