adamdebreceni commented on a change in pull request #1188: URL: https://github.com/apache/nifi-minifi-cpp/pull/1188#discussion_r730981919
########## File path: extensions/standard-processors/processors/DefragmentText.cpp ########## @@ -0,0 +1,347 @@ +/** + * 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. + */ + +#include "DefragmentText.h" + +#include <vector> + +#include "core/Resource.h" +#include "serialization/PayloadSerializer.h" +#include "TextFragmentUtils.h" +#include "utils/gsl.h" + +namespace org::apache::nifi::minifi::processors { + +const core::Relationship DefragmentText::Success("success", "Flowfiles that have no fragmented messages in them"); +const core::Relationship DefragmentText::Failure("failure", "Flowfiles that failed the defragmentation process"); +const core::Relationship DefragmentText::Self("__self__", "Marks the FlowFile to be owned by this processor"); + +const core::Property DefragmentText::Pattern( + core::PropertyBuilder::createProperty("Pattern") + ->withDescription("A regular expression to match at the start or end of messages.") + ->withDefaultValue("")->isRequired(true)->build()); Review comment: I am not sure, if the default value makes sense here, doesn't the empty regex match everything? (fortunately (and counterintuitively) the `sregex_iterator` iteration (`std::next` to the last one) terminates with the empty regex) -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org