This is an automated email from the ASF dual-hosted git repository.

lordgamez pushed a commit to branch MINIFICPP-2458
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 6c799125feb6b975347c8a5f82432629ae30f4f5
Author: Gabor Gyimesi <gamezb...@gmail.com>
AuthorDate: Thu Jul 10 17:58:38 2025 +0200

    Review update
---
 .../standard-processors/processors/EvaluateJsonPath.cpp      |  2 +-
 .../standard-processors/tests/unit/EvaluateJsonPathTests.cpp | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/extensions/standard-processors/processors/EvaluateJsonPath.cpp 
b/extensions/standard-processors/processors/EvaluateJsonPath.cpp
index a8e553f7c..3422c67be 100644
--- a/extensions/standard-processors/processors/EvaluateJsonPath.cpp
+++ b/extensions/standard-processors/processors/EvaluateJsonPath.cpp
@@ -43,7 +43,7 @@ void EvaluateJsonPath::initialize() {
 }
 
 void EvaluateJsonPath::onSchedule(core::ProcessContext& context, 
core::ProcessSessionFactory&) {
-  if (getDynamicProperties().size() < 1) {
+  if (getDynamicProperties().empty()) {
     throw Exception(PROCESS_SCHEDULE_EXCEPTION, "At least one dynamic property 
must be specified with a valid JSON path expression");
   }
   destination_ = 
utils::parseEnumProperty<evaluate_json_path::DestinationType>(context, 
EvaluateJsonPath::Destination);
diff --git 
a/extensions/standard-processors/tests/unit/EvaluateJsonPathTests.cpp 
b/extensions/standard-processors/tests/unit/EvaluateJsonPathTests.cpp
index 379d98fce..ff3e82bbb 100644
--- a/extensions/standard-processors/tests/unit/EvaluateJsonPathTests.cpp
+++ b/extensions/standard-processors/tests/unit/EvaluateJsonPathTests.cpp
@@ -123,7 +123,7 @@ TEST_CASE_METHOD(EvaluateJsonPathTestFixture, "JSON paths 
are not found in conte
     if (!expect_attributes) {
       CHECK_FALSE(result_flow_file->getAttribute(key));
     } else {
-      CHECK(*result_flow_file->getAttribute(key) == value);
+      CHECK(result_flow_file->getAttribute(key).value() == value);
     }
   }
 
@@ -226,9 +226,9 @@ TEST_CASE_METHOD(EvaluateJsonPathTestFixture, "Query 
multiple scalars and write
   const auto result_flow_file = 
result.at(processors::EvaluateJsonPath::Matched).at(0);
 
   CHECK(controller_.plan->getContent(result_flow_file) == json_content);
-  CHECK(*result_flow_file->getAttribute("firstName") == "John");
-  CHECK(*result_flow_file->getAttribute("lastName") == "Doe");
-  CHECK(*result_flow_file->getAttribute("id") == "1234");
+  CHECK(result_flow_file->getAttribute("firstName").value() == "John");
+  CHECK(result_flow_file->getAttribute("lastName").value() == "Doe");
+  CHECK(result_flow_file->getAttribute("id").value() == "1234");
 }
 
 TEST_CASE_METHOD(EvaluateJsonPathTestFixture, "Query a single scalar and write 
it to flow file", "[EvaluateJsonPathTests]") {
@@ -317,8 +317,8 @@ TEST_CASE_METHOD(EvaluateJsonPathTestFixture, "Query result 
is null value in flo
   const auto result_flow_file = 
result.at(processors::EvaluateJsonPath::Matched).at(0);
 
   CHECK(controller_.plan->getContent(result_flow_file) == json_content);
-  CHECK(*result_flow_file->getAttribute("firstName") == "John");
-  CHECK(*result_flow_file->getAttribute("email") == expected_null_value);
+  CHECK(result_flow_file->getAttribute("firstName").value() == "John");
+  CHECK(result_flow_file->getAttribute("email").value() == 
expected_null_value);
 }
 
 }  // namespace org::apache::nifi::minifi::test

Reply via email to