adamdebreceni commented on a change in pull request #1138:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1138#discussion_r691838093
##########
File path: extensions/standard-processors/tests/unit/ClassLoaderTests.cpp
##########
@@ -20,6 +20,8 @@
#include "core/Processor.h"
#include "core/ClassLoader.h"
#include "core/yaml/YamlConfiguration.h"
+#include "core/extension/ExtensionManager.h"
+#include "utils/file/FileUtils.h"
Review comment:
almost none of the included headers are used in this test, removed them
##########
File path: libminifi/include/core/Resource.h
##########
@@ -37,29 +41,64 @@ namespace core {
#define MKSOC(x) #x
#define MAKESTRING(x) MKSOC(x)
+static inline ClassLoader& getClassLoader() {
+#ifdef MODULE_NAME
+ return
ClassLoader::getDefaultClassLoader().getClassLoader(MAKESTRING(MODULE_NAME));
+#else
+ return ClassLoader::getDefaultClassLoader();
+#endif
+}
+
template<class T>
class StaticClassType {
public:
- StaticClassType(const std::string &name, const std::string &description =
"") { // NOLINT
+ StaticClassType(const std::string& name, const std::optional<std::string>&
description, const std::vector<std::string>& construction_names)
+ : name_(name), construction_names_(construction_names) { // NOLINT
Review comment:
unclear, removed it
##########
File path: libminifi/include/utils/file/FileMatcher.h
##########
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <string>
+#include <vector>
+#include <set>
+#include <utility>
+#include <memory>
+
+#include "utils/OptionalUtils.h"
+#include "core/logging/Logger.h"
+
+struct FileMatcherTestAccessor;
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace utils {
+namespace file {
+
+class FileMatcher {
+ friend struct ::FileMatcherTestAccessor;
+ class FilePattern {
+ FilePattern(std::vector<std::string> directory_segments, std::string
file_pattern, bool excluding)
+ : directory_segments_(std::move(directory_segments)),
+ file_pattern_(std::move(file_pattern)),
+ excluding_(excluding) {}
+
+ public:
+ enum class MatchResult {
+ INCLUDE, // dir/file should be processed according to the pattern
+ EXCLUDE, // dir/file is explicitly rejected by the pattern
+ DONT_CARE // dir/file does not match pattern, do what you may
Review comment:
renamed it to `NOT_MATCHING`
##########
File path: libminifi/include/core/extension/ExtensionManager.h
##########
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "core/logging/Logger.h"
+#include "DynamicLibrary.h"
Review comment:
replaced
--
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]