{"id":474743,"date":"2025-09-12T09:00:53","date_gmt":"2025-09-12T09:00:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=474743"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=474743","title":{"rendered":"<span>\u0411\u0430\u0433\u0438 \u043d\u043e\u0441\u044f\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 Apache NiFi<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0431\u043e\u0440, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 IT. \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0430\u0440\u0443\u0448\u0430\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0445 \u0431\u0430\u0433\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435? \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Apache NiFi.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/598\/703\/967\/59870396789edeece3c503e1e1de9e90.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/598\/703\/967\/59870396789edeece3c503e1e1de9e90.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/598\/703\/967\/59870396789edeece3c503e1e1de9e90.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><a href=\"https:\/\/github.com\/apache\/nifi\" rel=\"noopener noreferrer nofollow\">Apache NiFi<\/a> \u2014 \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u0432 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u043c \u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0430 \u0432 2014 \u0433\u043e\u0434\u0443 \u0441\u0442\u0430\u043b \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438 \u0432\u043e\u0448\u0451\u043b \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 Apache. \u0421\u0435\u0433\u043e\u0434\u043d\u044f NiFi \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Hadoop.<\/p>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442 Apache Hadoop. \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/java\/0697\/\" rel=\"noopener noreferrer nofollow\">\u0431\u043b\u043e\u0433\u0435<\/a>.<\/p>\n<\/blockquote>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e NiFi \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0433\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430 \u0441\u0445\u0435\u043c\u0435: \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0448\u044c \u0431\u043b\u043e\u043a\u0438 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b) \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0448\u044c \u0438\u0445 \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c, \u043d\u043e \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430\u043c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. NiFi \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438: \u0444\u0430\u0439\u043b\u044b \u043f\u043e SFTP, \u043b\u043e\u0433\u0438 \u043f\u043e syslog, \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0447\u0435\u0440\u0435\u0437 JDBC), Kafka, HDFS, Elasticsearch \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0431\u0430\u0433\u0438 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/apache\/nifi\/tree\/d9246807ea115f65dc3871b94a2011e1b6001c7d\" rel=\"noopener noreferrer nofollow\">d924680<\/a>.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430 \u2014 <a href=\"https:\/\/pmd.github.io\/\" rel=\"noopener noreferrer nofollow\">PMD<\/a>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 PVS-Studio \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \ud83d\ude42<\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c?<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Maven, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d PVS-Studio \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u0432 \u0444\u0430\u0439\u043b <code>pom.xml<\/code>. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 PVS-Studio:<\/p>\n<pre><code class=\"xml\">.... &lt;pluginRepositories&gt;   &lt;pluginRepository&gt;     &lt;id&gt;pvsstudio-maven-repo&lt;\/id&gt;     &lt;url&gt;https:\/\/wcdn.pvs-studio.com\/java\/pvsstudio-maven-repository\/&lt;\/url&gt;   &lt;\/pluginRepository&gt; &lt;\/pluginRepositories&gt; .... <\/code><\/pre>\n<p>\u0410 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code class=\"xml\">.... &lt;pluginManagement&gt;   &lt;plugins&gt;     &lt;plugin&gt;       &lt;groupId&gt;com.pvsstudio&lt;\/groupId&gt;       &lt;artifactId&gt;pvsstudio-maven-plugin&lt;\/artifactId&gt;       &lt;version&gt;7.38.96564&lt;\/version&gt;       &lt;configuration&gt;         &lt;analyzer&gt;           &lt;outputType&gt;json&lt;\/outputType&gt;           &lt;outputFile&gt;PVS-Studio.json&lt;\/outputFile&gt;           &lt;analysisMode&gt;GA,OWASP&lt;\/analysisMode&gt;         &lt;\/analyzer&gt;       &lt;\/configuration&gt;     &lt;\/plugin&gt;     ....   &lt;\/plugins&gt; &lt;\/pluginManagement&gt; .... <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><code>&lt;outputType&gt;<\/code> \u2014 \u0444\u043e\u0440\u043c\u0430\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0447\u0451\u0442\u0430 json);<\/p>\n<\/li>\n<li>\n<p><code>&lt;outputFile&gt;<\/code> \u2014 \u043f\u0443\u0442\u044c, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043e\u0442\u0447\u0451\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430);<\/p>\n<\/li>\n<li>\n<p><code>&lt;analysisMode&gt;<\/code> \u2014 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f General Analysis \u0438 OWASP).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 <code>pom.xml<\/code> \u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>mvn pvsstudio:pvsAnalyze <\/code><\/pre>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0435 PVS-Studio \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Maven \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6705\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u0448\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<\/blockquote>\n<h3>\u0422\u0430\u043a\u043e\u0432\u044b \u043d\u0430\u0448\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h3>\n<p>\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u2014 \u0447\u0430\u0441\u0442\u044b\u0435 \u0433\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 open source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c? \ud83d\ude42<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 1<\/strong><\/p>\n<pre><code class=\"java\">public void communicate() throws IOException {   final String line = reader.readLine();   final String[] splits = line.split(\" \");    if (splits.length &lt; 0) {     throw new IOException(....);   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6007\/\" rel=\"noopener noreferrer nofollow\">V6007<\/a> Expression &#8216;splits.length &lt; 0&#8217; is always false. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-registry\/nifi-registry-core\/nifi-registry-bootstrap\/src\/main\/java\/org\/apache\/nifi\/registry\/bootstrap\/BootstrapCodec.java#L45\" rel=\"noopener noreferrer nofollow\">BootstrapCodec.java 45<\/a><\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c\u0441\u044f, \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430! \u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043c\u044b \u0431\u0440\u043e\u0441\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430&#8230; \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f.<\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0430\u0432\u0442\u043e\u0440 \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0432\u043d\u0430 \u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0443\u043b\u044e, \u043d\u043e \u044d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0442\u043e\u0436\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442&#8230; \u041f\u043e\u0447\u0435\u043c\u0443?<\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0447\u0435\u0440\u0435\u0437 <code>reader<\/code>, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>line.split()<\/code> \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430, \u0442\u043e <code>String.split()<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 2<\/strong><\/p>\n<pre><code class=\"java\">protected Map&lt;String, String&gt; getAttributes(   final TarArchiveInputStream stream ) throws IOException {   ....   for (final Entry&lt;Object, Object&gt; entry : props.entrySet()) {     final Object keyObject = entry.getKey();     final Object valueObject = entry.getValue();     if (!(keyObject instanceof String)) {            \/\/ &lt;=       throw new IOException(         \"Flow file attributes object contains key of type \"         + keyObject.getClass().getCanonicalName()         + \" but expected java.lang.String\");     } else if (!(keyObject instanceof String)) {     \/\/ &lt;=       throw new IOException(         \"Flow file attributes object contains value of type \"         + keyObject.getClass().getCanonicalName()         + \" but expected java.lang.String\");   }   final String key = (String) keyObject;   final String value = (String) valueObject;   result.put(key, value);   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6003\/\" rel=\"noopener noreferrer nofollow\">V6003<\/a> The use of &#8216;if (A) {&#8230;} else if (A) {&#8230;}&#8217; pattern was detected. There is a probability of logical error presence. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-commons\/nifi-flowfile-packager\/src\/main\/java\/org\/apache\/nifi\/util\/FlowFileUnpackagerV1.java#L80\" rel=\"noopener noreferrer nofollow\">FlowFileUnpackagerV1.java 80<\/a><\/p>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u043b\u0438 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0431\u0435\u0437\u044b\u0441\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438?<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u0431\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435. \u041d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043d\u043e \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438 \u044d\u0442\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0427\u0442\u043e \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e? \u0410\u0432\u0442\u043e\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u043b\u043e\u043a \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u0432 <code>else if<\/code>, \u0437\u0430\u0431\u044b\u0432 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c <code>keyObject<\/code> \u043d\u0430 <code>valueObject<\/code>. \u041f\u0440\u0438\u0447\u0451\u043c \u0437\u0430\u0431\u044b\u043b \u043e\u043d \u0435\u0433\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0435\u0437\u0434\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e <code>IOException<\/code>.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 3<\/strong><\/p>\n<pre><code class=\"java\">public void setOutputPorts(   final Set&lt;RemoteProcessGroupPortDescriptor&gt; ports,    final boolean pruneUnusedPorts ) { .... final Iterator&lt;StandardRemoteGroupPort&gt; itr = outputPorts.values().iterator(); int prunedCount = 0; while (itr.hasNext()) {   final StandardRemoteGroupPort port = itr.next();   if (....) {     port.setTargetExists(false);     port.setTargetRunning(false);       \/\/ If port has connections,        \/\/ it will be cleaned up        \/\/ when connections are removed       if (port.getConnections().isEmpty()) {         itr.remove();         logger.info(           \"Pruning unused Output Port {} from {}\", port, this         );        }      }    }     if (prunedCount == 0) {  \/\/ &lt;=       logger.debug(         \"There were no Output Ports to prune from {}\",          this       );     } else {....}   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6007\/\" rel=\"noopener noreferrer nofollow\">V6007<\/a> Expression &#8216;prunedCount == 0&#8217; is always true. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-framework-bundle\/nifi-framework\/nifi-framework-components\/src\/main\/java\/org\/apache\/nifi\/remote\/StandardRemoteProcessGroup.java#L640\" rel=\"noopener noreferrer nofollow\">StandardRemoteProcessGroup.java 640<\/a><\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0434\u0451\u0442 \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u043e\u0440\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0447\u0451\u0442\u0447\u0438\u043a <code>prunedCount<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0440\u0442\u043e\u0432 \u0431\u044b\u043b\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043e.<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <code>prunedCount == 0<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e. \u0418 \u043e\u043d \u043f\u0440\u0430\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f: \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041d\u043e, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u043b\u043e\u0433\u0438 \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 <code>itr.remove()<\/code> \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0430. \u041e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u0436\u0435 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432 \u043b\u043e\u0433. \u0417\u043d\u0430\u0447\u0438\u0442, \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 <code>prunedCount<\/code>. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c.<\/p>\n<h3>\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0433\u0438<\/h3>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043b\u043e\u0432\u0438\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f?<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 4<\/strong><\/p>\n<pre><code class=\"java\">public void revertReceivedTo(Relationship r, Throwable t) {   ....   String errorMessage = Throwables.getMessage(t, null, 950);   String stackTrace = Throwables.stringStackTrace(t);   for (FlowFile f : toFail) {     if (t != null &amp;&amp; r != null) {       ....     }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6060\/\" rel=\"noopener noreferrer nofollow\">V6060<\/a> The &#8216;t&#8217; reference was utilized before it was verified against null. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/flow\/ProcessSessionWrap.java#L210\" rel=\"noopener noreferrer nofollow\">ProcessSessionWrap.java 210<\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 <code>t<\/code> \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0448\u0451\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 <code>null<\/code>. \u0414\u0430\u0431\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/util\/Throwables.java#L28\" rel=\"noopener noreferrer nofollow\">\u043c\u0435\u0442\u043e\u0434 <code>Throwables.stringStackTrace()<\/code><\/a>:<\/p>\n<pre><code class=\"java\">public static String stringStackTrace(Throwable e) {   StringWriter sw = new StringWriter(500);   PrintWriter pw = new PrintWriter(sw);   e.printStackTrace(pw);   pw.flush();   sw.flush();   return sw.toString(); } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435! \u0418\u043b\u0438 \u043d\u0435\u0442?<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <code>t != null<\/code> \u0432 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f. \u041f\u0440\u0438 <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/ExecuteGroovyScript.java#L490\" rel=\"noopener noreferrer nofollow\">\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0432 \u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/ExecuteGroovyScript.java#L142\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430<\/a>, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 <code>new<\/code>:<\/p>\n<pre><code class=\"java\">public class ExecuteGroovyScript extends AbstractProcessor {   ....    public static final Relationship REL_FAILURE = new Relationship       .Builder()       .name(\"failure\")       .description(\"FlowFiles that failed to be processed\")       .build();    ....    public void onTrigger(     final ProcessContext context,      final ProcessSession _session   ) throws ProcessException {   ....     if (toFailureOnError) {       session.revertReceivedTo(         REL_FAILURE,          StackTraceUtils.deepSanitize(t)       );     } else {....}     ....   } <\/code><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u044f\u0432\u0438\u043b \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 \u043c\u0435\u0442\u043e\u0434\u0430. \u0418 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443. \u041d\u0435 \u0437\u0440\u044f \u0436\u0435 \u043c\u044b \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0451\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \ud83d\ude42<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 5<\/strong><\/p>\n<pre><code class=\"java\">public void finishTransferFlowFiles(   final CommunicationsSession commSession ) throws IOException {   if (postResult == null) {     new IllegalStateException(....);   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v5303\/\" rel=\"noopener noreferrer nofollow\">V5303<\/a> The object was created but it is not being used. The &#8216;throw&#8217; keyword could be missing. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-commons\/nifi-site-to-site-client\/src\/main\/java\/org\/apache\/nifi\/remote\/util\/SiteToSiteRestApiClient.java#L919\" rel=\"noopener noreferrer nofollow\">SiteToSiteRestApiClient.java 919<\/a><\/p>\n<p>\u0422\u0440\u0451\u0445\u043e\u0447\u043a\u043e\u0432\u044b\u0439!<\/p>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0432\u0441\u0435\u0439 \u043d\u0443\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u043e\u0441\u0430\u0442\u044c, \u043d\u043e&#8230; \u043e\u0439. \u041c\u044b \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0438 \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u0443\u0447\u043d\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0430\u0442\u044c&#8230;<\/p>\n<blockquote>\n<p>\u0422\u0430\u043a \u0442\u0440\u0443\u0434\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 Exception, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u043e\u0436\u0435\u0448\u044c \u0431\u0440\u043e\u0441\u0438\u0442\u044c&#8230;<\/p>\n<p>\u00a9 \u041d\u0435\u0438\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u0445 \u0446\u0438\u0442\u0430\u0442<\/p>\n<\/blockquote>\n<h3>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 NullPointerException<\/h3>\n<p>\u041d\u0435 \u043e\u0431\u043e\u0439\u0434\u0451\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u044e \u2014 \u043e\u0448\u0438\u0431\u043a\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f <code>null<\/code>.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 6<\/strong><\/p>\n<pre><code class=\"java\">private boolean replaceNodeStatus(   final NodeIdentifier nodeId,    final NodeConnectionStatus currentStatus,    final NodeConnectionStatus newStatus ) {   if (newStatus == null) {               \/\/ &lt;=     logger.error(\"....\", nodeId, currentStatus, newStatus);     logger.error(\"\", new NullPointerException());   }      ....    if (newStatus.getState() ==            \/\/ &lt;=       NodeConnectionState.REMOVED) {          ....   } else {....} } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6008\/\" rel=\"noopener noreferrer nofollow\">V6008<\/a> Potential null dereference of &#8216;newStatus&#8217;. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-framework-bundle\/nifi-framework\/nifi-framework-cluster\/src\/main\/java\/org\/apache\/nifi\/cluster\/coordination\/node\/NodeClusterCoordinator.java#L448\" rel=\"noopener noreferrer nofollow\">NodeClusterCoordinator.java 448<\/a><\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>newStatus<\/code> \u0440\u0430\u0432\u043d\u0430 <code>null<\/code>, \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e \u0432 \u043b\u043e\u0433, \u043c\u043e\u043b, &#171;\u0432\u0441\u0451 \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c, \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043e&#187; \u0438 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0410 \u0447\u0442\u043e \u043d\u0430\u0441 \u0436\u0434\u0451\u0442 &#171;\u0434\u0430\u043b\u0435\u0435&#187;? \u0412\u0441\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u2014 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 <code>newStatus<\/code> \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0440\u0430\u0432\u043d\u0430 \u043e\u043d\u0430 \u043d\u0443\u043b\u044e \u0438\u043b\u0438 \u043d\u0435\u0442. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 <code>return<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/20d\/6cc\/e16\/20d6cce168e350544a0d4ed54297d98f.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/20d\/6cc\/e16\/20d6cce168e350544a0d4ed54297d98f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/20d\/6cc\/e16\/20d6cce168e350544a0d4ed54297d98f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 7<\/strong><\/p>\n<pre><code class=\"java\">public void addFileStatus(   final FileStatus parent,    final FileStatus child ) {   Set&lt;FileStatus&gt; children = fileStatuses.computeIfAbsent(     parent.getPath(), k -&gt; new HashSet&lt;&gt;()   );   if (child != null) {                           \/\/ &lt;=     children.add(child);     if (      child.isDirectory() &amp;&amp;       !fileStatuses.containsKey(child.getPath())     ) {       fileStatuses.put(child.getPath(), new HashSet&lt;&gt;());     }   }    pathToStatus.put(parent.getPath(), parent);   pathToStatus.put(child.getPath(), child);      \/\/ &lt;= } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6008\/\" rel=\"noopener noreferrer nofollow\">V6008<\/a> Potential null dereference of &#8216;child&#8217;. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-hadoop-bundle\/nifi-hdfs-processors\/src\/test\/java\/org\/apache\/nifi\/processors\/hadoop\/util\/MockFileSystem.java#L265\" rel=\"noopener noreferrer nofollow\">MockFileSystem.java 265<\/a><\/p>\n<p>\u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0445\u0440\u0435\u0441\u0442\u043e\u043c\u0430\u0442\u0438\u0439\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438, \u0447\u0442\u043e <code>child<\/code> \u043d\u0435 \u0440\u0430\u0432\u0435\u043d <code>null<\/code>, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u0437\u044f\u043b\u0438 \u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u0432\u043d\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0442\u0430\u043a\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u044b \u043f\u0440\u0438\u0432\u0435\u0434\u0443\u0442 \u043a <code>NullPointerException<\/code> \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 <code>child<\/code> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <code>null<\/code>.<\/p>\n<h3>\u0412\u0441\u0435 \u0440\u0430\u0432\u043d\u044b?<\/h3>\n<p>\u0412 Apache NiFi \u043d\u0430\u0448\u0451\u043b\u0441\u044f \u0446\u0435\u043b\u044b\u0439 \u043f\u043b\u0430\u0441\u0442 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0438, \u0433\u0434\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u043f\u043e \u043f\u043b\u0430\u043d\u0443 \u043f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 8<\/strong><\/p>\n<pre><code class=\"java\">public void onTrigger(   final ProcessContext context,    final ProcessSession session ) {   final String listingStrategy = context.getProperty(     LISTING_STRATEGY   ).getValue();    if (BY_TIMESTAMPS.equals(listingStrategy)) {       \/\/ &lt;=     listByTrackingTimestamps(context, session);   } else if (BY_ENTITIES.equals(listingStrategy)) {  \/\/ &lt;=     listByTrackingEntities(context, session);   } else if (NO_TRACKING.equals(listingStrategy)) {  \/\/ &lt;=     listNoTracking(context, session);   } else {     throw new ProcessException(....);   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-gcp-bundle\/nifi-gcp-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/gcp\/storage\/ListGCSBucket.java#L437\" rel=\"noopener noreferrer nofollow\">ListGCSBucket.java 437<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-gcp-bundle\/nifi-gcp-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/gcp\/storage\/ListGCSBucket.java#L439\" rel=\"noopener noreferrer nofollow\">ListGCSBucket.java 437<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-gcp-bundle\/nifi-gcp-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/gcp\/storage\/ListGCSBucket.java#L441\" rel=\"noopener noreferrer nofollow\">ListGCSBucket.java 441<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0434\u0432\u0430 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0445 \u0442\u0438\u043f\u0430: <code>AllowableValue<\/code> \u0438 <code>String<\/code>. \u0411\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0437\u0432\u0443\u0447\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e: \u0443 \u0442\u0438\u043f\u0430 <code>AllowableValue<\/code> \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>getValue()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435:<\/p>\n<pre><code class=\"java\">public class AllowableValue implements DescribedValue {   private final String value;   ....   public String getValue() {         return this.value;   } } <\/code><\/pre>\n<p>\u0418\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>equals()<\/code>:<\/p>\n<pre><code class=\"java\">.... if (BY_TIMESTAMPS.getValue().equals(listingStrategy)) {   listByTrackingTimestamps(context, session); } else if (BY_ENTITIES.getValue().equals(listingStrategy)) {   listByTrackingEntities(context, session); } else if (NO_TRACKING.getValue().equals(listingStrategy)) {   listNoTracking(context, session); } else {   throw new ProcessException(....); } .... <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-extension-utils\/nifi-listed-entity\/src\/main\/java\/org\/apache\/nifi\/processor\/util\/list\/AbstractListProcessor.java#L419\" rel=\"noopener noreferrer nofollow\">AbstractListProcessor.java 419<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-extension-utils\/nifi-listed-entity\/src\/main\/java\/org\/apache\/nifi\/processor\/util\/list\/AbstractListProcessor.java#L422\" rel=\"noopener noreferrer nofollow\">AbstractListProcessor.java 422<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-extension-utils\/nifi-listed-entity\/src\/main\/java\/org\/apache\/nifi\/processor\/util\/list\/AbstractListProcessor.java#L425\" rel=\"noopener noreferrer nofollow\">AbstractListProcessor.java 425<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-extension-utils\/nifi-listed-entity\/src\/main\/java\/org\/apache\/nifi\/processor\/util\/list\/AbstractListProcessor.java#L428\" rel=\"noopener noreferrer nofollow\">AbstractListProcessor.java 428<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-aws-bundle\/nifi-aws-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/aws\/s3\/ListS3.java#L484\" rel=\"noopener noreferrer nofollow\">ListS3.java 484<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-aws-bundle\/nifi-aws-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/aws\/s3\/ListS3.java#L486\" rel=\"noopener noreferrer nofollow\">ListS3.java 486<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6058\/\" rel=\"noopener noreferrer nofollow\">V6058<\/a> The &#8216;equals&#8217; function compares objects of incompatible types: AllowableValue, String. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-aws-bundle\/nifi-aws-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/aws\/s3\/ListS3.java#L488\" rel=\"noopener noreferrer nofollow\">ListS3.java 488<\/a><\/p>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 9<\/strong><\/p>\n<pre><code class=\"java\">public synchronized void addFlowSnapshot(   final VersionedExternalFlow versionedExternalFlow ) {   final String version;   if (metadata == null) {     bucketId = DEFAULT_BUCKET_ID;     flowId = \"flow-\" + flowIdGenerator.getAndIncrement();     version = \"1\";   } else {     bucketId = metadata.getBucketIdentifier();     flowId = metadata.getFlowIdentifier();     version = metadata.getVersion();   }   ....   final Optional&lt;VersionedExternalFlow&gt; optionalSnapshot =      snapshots.stream().filter(       snapshot -&gt;          snapshot.getMetadata().getVersion() == version  \/\/ &lt;=     ).findAny();   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6013\/\" rel=\"noopener noreferrer nofollow\">V6013<\/a> Strings &#8216;snapshot.getMetadata().getVersion()&#8217; and &#8216;version&#8217; are compared by reference. Possibly an equality comparison was intended. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-stateless\/nifi-stateless-bundle\/nifi-stateless-engine\/src\/main\/java\/org\/apache\/nifi\/registry\/flow\/InMemoryFlowRegistry.java#L165\" rel=\"noopener noreferrer nofollow\">InMemoryFlowRegistry.java 165<\/a><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 <code>snapshot.getMetadata().getVersion()<\/code> \u0438 <code>version<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>==<\/code>. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u044d\u0442\u043e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u0442\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0430 \u0438\u0445 \u0441\u0441\u044b\u043b\u043a\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u0431\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>\u041a\u043e\u0432\u0430\u0440\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 <a href=\"https:\/\/stackoverflow.com\/questions\/1881922\/questions-about-javas-string-pool\" rel=\"noopener noreferrer nofollow\">String Pool<\/a> \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>==<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>equals()<\/code>.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 10<\/strong><\/p>\n<pre><code class=\"java\">public boolean equals(final Object o) {   if (this == o) {     return true;   }    if (o == null       || getClass() != o.getClass()       || !Arrays.equals(            o.getClass().getGenericInterfaces(),  \/\/ &lt;=            o.getClass().getGenericInterfaces()   \/\/ &lt;=        )                                              ) {        return false;      }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6009\/\" rel=\"noopener noreferrer nofollow\">V6009<\/a> Function &#8216;equals&#8217; receives an odd argument. The &#8216;o.getClass().getGenericInterfaces()&#8217; argument was passed several times. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-mock\/src\/main\/java\/org\/apache\/nifi\/util\/EqualsWrapper.java#L126\" rel=\"noopener noreferrer nofollow\">EqualsWrapper.java 126<\/a><\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>equals()<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 override&#8217;\u0430 <code>equals()<\/code>. <strong>\u041a-\u041a-\u041a-\u041a\u041e\u041c\u0411\u041e!<\/strong><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>equals()<\/code> \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432, \u043d\u043e&#8230; \u0437\u043b\u043e\u0441\u0447\u0430\u0441\u0442\u043d\u044b\u0439 copy-paste \u0438\u0441\u043f\u043e\u0440\u0442\u0438\u043b \u043d\u0430\u043c \u0432\u0441\u0435 \u043f\u043b\u0430\u043d\u044b. \u0412 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 <code>equals<\/code> \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u043c\u0435\u0442\u043e\u0434. \u041d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>getClass().getGenericInterfaces()<\/code> \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">public boolean equals(final Object o) {   if (this == o) {     return true;   }    if (o == null       || getClass() != o.getClass()       || !Arrays.equals(            getGenericInterfaces(),              o.getClass().getGenericInterfaces()           )                                              ) {        return false;      }   .... } <\/code><\/pre>\n<h3>\u0412\u0430\u0448\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0435\u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b<\/h3>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 11<\/strong><\/p>\n<pre><code class=\"java\">static Properties load(File file, String propertiesType) {   ....   try (     InputStream inputStream = new BufferedInputStream(       new FileInputStream(file)     )   ) {     rawProperties.load(inputStream);   } catch (Exception e) {     throw new RuntimeException(       String.format(         \"Loading {} Properties [%s] failed\",          propertiesType,          file       ), e);   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6046\/\" rel=\"noopener noreferrer nofollow\">V6046<\/a> Incorrect format. A different number of format items is expected. Arguments not used: 2. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/minifi\/minifi-nar-bundles\/minifi-framework-bundle\/minifi-framework\/minifi-properties-loader\/src\/main\/java\/org\/apache\/nifi\/minifi\/properties\/PropertiesLoader.java#L43\" rel=\"noopener noreferrer nofollow\">PropertiesLoader.java 43<\/a><\/p>\n<p>\u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>String.format()<\/code> \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u043e\u043a\u0443. \u041d\u043e \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435! \u0412 \u0441\u0442\u0440\u043e\u043a\u0435 \u0436\u0435 \u0434\u0432\u0430 \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438!<\/p>\n<p>\u0414\u0430, \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043c\u0435\u0448\u0430\u043b\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0441\u0442\u0440\u043e\u043a \u0434\u043b\u044f <code>String.format()<\/code> \u0438 \u043b\u043e\u0433\u0433\u0435\u0440\u0430, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 <code>String.format()<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u043b\u0451\u0442\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<p>V6046 Incorrect format. A different number of format items is expected. Arguments not used: 2. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/minifi\/minifi-nar-bundles\/minifi-framework-bundle\/minifi-framework\/minifi-properties-loader\/src\/main\/java\/org\/apache\/nifi\/minifi\/properties\/PropertiesLoader.java#L34\" rel=\"noopener noreferrer nofollow\">PropertiesLoader.java 34<\/a><\/p>\n<p>V6046 Incorrect format. A different number of format items is expected. Arguments not used: 1. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/minifi\/minifi-nar-bundles\/minifi-framework-bundle\/minifi-framework\/minifi-framework-core\/src\/main\/java\/org\/apache\/nifi\/minifi\/c2\/command\/PropertiesPersister.java#L110\" rel=\"noopener noreferrer nofollow\">PropertiesPersister.java 110<\/a><\/p>\n<\/div>\n<\/details>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e. \u041e\u0431\u043e \u0432\u0441\u0435\u0445 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u043c\u044b \u0441\u043e\u043e\u0431\u0449\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043e\u0442\u043a\u0440\u044b\u0432 Issue \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub.<\/p>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435 \u2014 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0432\u0441\u0435, \u0438, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e. \u0412\u0430\u0436\u043d\u043e \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c PVS-Studio \u0432 Apache NiFi, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0443\u0436\u0435 \u0432 \u0441\u0432\u043e\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1285\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>\u0427\u0438\u0441\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u0430\u043c, \u0434\u0440\u0443\u0437\u044c\u044f!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Valerii Filatov. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/java\/1285\/\" rel=\"noopener noreferrer nofollow\">Bugs wear data. Let&#8217;s check Apache NiFi<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/946266\/\"> https:\/\/habr.com\/ru\/articles\/946266\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0431\u043e\u0440, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 IT. \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0430\u0440\u0443\u0448\u0430\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0445 \u0431\u0430\u0433\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435? \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Apache NiFi.<\/p>\n<figure class=\"\"><\/figure>\n<p><a href=\"https:\/\/github.com\/apache\/nifi\" rel=\"noopener noreferrer nofollow\">Apache NiFi<\/a> \u2014 \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u0432 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u043c \u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0430 \u0432 2014 \u0433\u043e\u0434\u0443 \u0441\u0442\u0430\u043b \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438 \u0432\u043e\u0448\u0451\u043b \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 Apache. \u0421\u0435\u0433\u043e\u0434\u043d\u044f NiFi \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Hadoop.<\/p>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442 Apache Hadoop. \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/java\/0697\/\" rel=\"noopener noreferrer nofollow\">\u0431\u043b\u043e\u0433\u0435<\/a>.<\/p>\n<\/blockquote>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e NiFi \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0433\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430 \u0441\u0445\u0435\u043c\u0435: \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0448\u044c \u0431\u043b\u043e\u043a\u0438 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b) \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0448\u044c \u0438\u0445 \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c, \u043d\u043e \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430\u043c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. NiFi \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438: \u0444\u0430\u0439\u043b\u044b \u043f\u043e SFTP, \u043b\u043e\u0433\u0438 \u043f\u043e syslog, \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0447\u0435\u0440\u0435\u0437 JDBC), Kafka, HDFS, Elasticsearch \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0431\u0430\u0433\u0438 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/apache\/nifi\/tree\/d9246807ea115f65dc3871b94a2011e1b6001c7d\" rel=\"noopener noreferrer nofollow\">d924680<\/a>.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430 \u2014 <a href=\"https:\/\/pmd.github.io\/\" rel=\"noopener noreferrer nofollow\">PMD<\/a>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 PVS-Studio \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \ud83d\ude42<\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c?<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Maven, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d PVS-Studio \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u0432 \u0444\u0430\u0439\u043b <code>pom.xml<\/code>. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 PVS-Studio:<\/p>\n<pre><code class=\"xml\">.... &lt;pluginRepositories&gt;   &lt;pluginRepository&gt;     &lt;id&gt;pvsstudio-maven-repo&lt;\/id&gt;     &lt;url&gt;https:\/\/wcdn.pvs-studio.com\/java\/pvsstudio-maven-repository\/&lt;\/url&gt;   &lt;\/pluginRepository&gt; &lt;\/pluginRepositories&gt; .... <\/code><\/pre>\n<p>\u0410 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code class=\"xml\">.... &lt;pluginManagement&gt;   &lt;plugins&gt;     &lt;plugin&gt;       &lt;groupId&gt;com.pvsstudio&lt;\/groupId&gt;       &lt;artifactId&gt;pvsstudio-maven-plugin&lt;\/artifactId&gt;       &lt;version&gt;7.38.96564&lt;\/version&gt;       &lt;configuration&gt;         &lt;analyzer&gt;           &lt;outputType&gt;json&lt;\/outputType&gt;           &lt;outputFile&gt;PVS-Studio.json&lt;\/outputFile&gt;           &lt;analysisMode&gt;GA,OWASP&lt;\/analysisMode&gt;         &lt;\/analyzer&gt;       &lt;\/configuration&gt;     &lt;\/plugin&gt;     ....   &lt;\/plugins&gt; &lt;\/pluginManagement&gt; .... <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><code>&lt;outputType&gt;<\/code> \u2014 \u0444\u043e\u0440\u043c\u0430\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0447\u0451\u0442\u0430 json);<\/p>\n<\/li>\n<li>\n<p><code>&lt;outputFile&gt;<\/code> \u2014 \u043f\u0443\u0442\u044c, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043e\u0442\u0447\u0451\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430);<\/p>\n<\/li>\n<li>\n<p><code>&lt;analysisMode&gt;<\/code> \u2014 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f General Analysis \u0438 OWASP).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 <code>pom.xml<\/code> \u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>mvn pvsstudio:pvsAnalyze <\/code><\/pre>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0435 PVS-Studio \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Maven \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6705\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u0448\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<\/blockquote>\n<h3>\u0422\u0430\u043a\u043e\u0432\u044b \u043d\u0430\u0448\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h3>\n<p>\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u2014 \u0447\u0430\u0441\u0442\u044b\u0435 \u0433\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 open source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c? \ud83d\ude42<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 1<\/strong><\/p>\n<pre><code class=\"java\">public void communicate() throws IOException {   final String line = reader.readLine();   final String[] splits = line.split(\" \");    if (splits.length &lt; 0) {     throw new IOException(....);   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6007\/\" rel=\"noopener noreferrer nofollow\">V6007<\/a> Expression &#8216;splits.length &lt; 0&#8217; is always false. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-registry\/nifi-registry-core\/nifi-registry-bootstrap\/src\/main\/java\/org\/apache\/nifi\/registry\/bootstrap\/BootstrapCodec.java#L45\" rel=\"noopener noreferrer nofollow\">BootstrapCodec.java 45<\/a><\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c\u0441\u044f, \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430! \u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043c\u044b \u0431\u0440\u043e\u0441\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430&#8230; \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f.<\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0430\u0432\u0442\u043e\u0440 \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0432\u043d\u0430 \u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0443\u043b\u044e, \u043d\u043e \u044d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0442\u043e\u0436\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442&#8230; \u041f\u043e\u0447\u0435\u043c\u0443?<\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0447\u0435\u0440\u0435\u0437 <code>reader<\/code>, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>line.split()<\/code> \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430, \u0442\u043e <code>String.split()<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 2<\/strong><\/p>\n<pre><code class=\"java\">protected Map&lt;String, String&gt; getAttributes(   final TarArchiveInputStream stream ) throws IOException {   ....   for (final Entry&lt;Object, Object&gt; entry : props.entrySet()) {     final Object keyObject = entry.getKey();     final Object valueObject = entry.getValue();     if (!(keyObject instanceof String)) {            \/\/ &lt;=       throw new IOException(         \"Flow file attributes object contains key of type \"         + keyObject.getClass().getCanonicalName()         + \" but expected java.lang.String\");     } else if (!(keyObject instanceof String)) {     \/\/ &lt;=       throw new IOException(         \"Flow file attributes object contains value of type \"         + keyObject.getClass().getCanonicalName()         + \" but expected java.lang.String\");   }   final String key = (String) keyObject;   final String value = (String) valueObject;   result.put(key, value);   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6003\/\" rel=\"noopener noreferrer nofollow\">V6003<\/a> The use of &#8216;if (A) {&#8230;} else if (A) {&#8230;}&#8217; pattern was detected. There is a probability of logical error presence. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-commons\/nifi-flowfile-packager\/src\/main\/java\/org\/apache\/nifi\/util\/FlowFileUnpackagerV1.java#L80\" rel=\"noopener noreferrer nofollow\">FlowFileUnpackagerV1.java 80<\/a><\/p>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u043b\u0438 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0431\u0435\u0437\u044b\u0441\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438?<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u0431\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435. \u041d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043d\u043e \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438 \u044d\u0442\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0427\u0442\u043e \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e? \u0410\u0432\u0442\u043e\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u043b\u043e\u043a \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u0432 <code>else if<\/code>, \u0437\u0430\u0431\u044b\u0432 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c <code>keyObject<\/code> \u043d\u0430 <code>valueObject<\/code>. \u041f\u0440\u0438\u0447\u0451\u043c \u0437\u0430\u0431\u044b\u043b \u043e\u043d \u0435\u0433\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0435\u0437\u0434\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e <code>IOException<\/code>.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 3<\/strong><\/p>\n<pre><code class=\"java\">public void setOutputPorts(   final Set&lt;RemoteProcessGroupPortDescriptor&gt; ports,    final boolean pruneUnusedPorts ) { .... final Iterator&lt;StandardRemoteGroupPort&gt; itr = outputPorts.values().iterator(); int prunedCount = 0; while (itr.hasNext()) {   final StandardRemoteGroupPort port = itr.next();   if (....) {     port.setTargetExists(false);     port.setTargetRunning(false);       \/\/ If port has connections,        \/\/ it will be cleaned up        \/\/ when connections are removed       if (port.getConnections().isEmpty()) {         itr.remove();         logger.info(           \"Pruning unused Output Port {} from {}\", port, this         );        }      }    }     if (prunedCount == 0) {  \/\/ &lt;=       logger.debug(         \"There were no Output Ports to prune from {}\",          this       );     } else {....}   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6007\/\" rel=\"noopener noreferrer nofollow\">V6007<\/a> Expression &#8216;prunedCount == 0&#8217; is always true. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-framework-bundle\/nifi-framework\/nifi-framework-components\/src\/main\/java\/org\/apache\/nifi\/remote\/StandardRemoteProcessGroup.java#L640\" rel=\"noopener noreferrer nofollow\">StandardRemoteProcessGroup.java 640<\/a><\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0434\u0451\u0442 \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u043e\u0440\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0447\u0451\u0442\u0447\u0438\u043a <code>prunedCount<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0440\u0442\u043e\u0432 \u0431\u044b\u043b\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043e.<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <code>prunedCount == 0<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e. \u0418 \u043e\u043d \u043f\u0440\u0430\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f: \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041d\u043e, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u043b\u043e\u0433\u0438 \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 <code>itr.remove()<\/code> \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0430. \u041e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u0436\u0435 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432 \u043b\u043e\u0433. \u0417\u043d\u0430\u0447\u0438\u0442, \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 <code>prunedCount<\/code>. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c.<\/p>\n<h3>\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0433\u0438<\/h3>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043b\u043e\u0432\u0438\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f?<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 4<\/strong><\/p>\n<pre><code class=\"java\">public void revertReceivedTo(Relationship r, Throwable t) {   ....   String errorMessage = Throwables.getMessage(t, null, 950);   String stackTrace = Throwables.stringStackTrace(t);   for (FlowFile f : toFail) {     if (t != null &amp;&amp; r != null) {       ....     }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v6060\/\" rel=\"noopener noreferrer nofollow\">V6060<\/a> The &#8216;t&#8217; reference was utilized before it was verified against null. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/flow\/ProcessSessionWrap.java#L210\" rel=\"noopener noreferrer nofollow\">ProcessSessionWrap.java 210<\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 <code>t<\/code> \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0448\u0451\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 <code>null<\/code>. \u0414\u0430\u0431\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/util\/Throwables.java#L28\" rel=\"noopener noreferrer nofollow\">\u043c\u0435\u0442\u043e\u0434 <code>Throwables.stringStackTrace()<\/code><\/a>:<\/p>\n<pre><code class=\"java\">public static String stringStackTrace(Throwable e) {   StringWriter sw = new StringWriter(500);   PrintWriter pw = new PrintWriter(sw);   e.printStackTrace(pw);   pw.flush();   sw.flush();   return sw.toString(); } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435! \u0418\u043b\u0438 \u043d\u0435\u0442?<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <code>t != null<\/code> \u0432 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f. \u041f\u0440\u0438 <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/ExecuteGroovyScript.java#L490\" rel=\"noopener noreferrer nofollow\">\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0432 \u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-extension-bundles\/nifi-groovyx-bundle\/nifi-groovyx-processors\/src\/main\/java\/org\/apache\/nifi\/processors\/groovyx\/ExecuteGroovyScript.java#L142\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430<\/a>, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 <code>new<\/code>:<\/p>\n<pre><code class=\"java\">public class ExecuteGroovyScript extends AbstractProcessor {   ....    public static final Relationship REL_FAILURE = new Relationship       .Builder()       .name(\"failure\")       .description(\"FlowFiles that failed to be processed\")       .build();    ....    public void onTrigger(     final ProcessContext context,      final ProcessSession _session   ) throws ProcessException {   ....     if (toFailureOnError) {       session.revertReceivedTo(         REL_FAILURE,          StackTraceUtils.deepSanitize(t)       );     } else {....}     ....   } <\/code><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u044f\u0432\u0438\u043b \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 \u043c\u0435\u0442\u043e\u0434\u0430. \u0418 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443. \u041d\u0435 \u0437\u0440\u044f \u0436\u0435 \u043c\u044b \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0451\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \ud83d\ude42<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 5<\/strong><\/p>\n<pre><code class=\"java\">public void finishTransferFlowFiles(   final CommunicationsSession commSession ) throws IOException {   if (postResult == null) {     new IllegalStateException(....);   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v5303\/\" rel=\"noopener noreferrer nofollow\">V5303<\/a> The object was created but it is not being used. The &#8216;throw&#8217; keyword could be missing. <a href=\"https:\/\/github.com\/apache\/nifi\/blob\/d9246807ea115f65dc3871b94a2011e1b6001c7d\/nifi-commons\/nifi-site-to-site-client\/src\/main\/java\/org\/apache\/nifi\/remote\/util\/SiteToSiteRestApiClient.java#L919\" rel=\"noopener noreferrer nofollow\">SiteToSiteRestApiClient.java 919<\/a><\/p>\n<p>\u0422\u0440\u0451\u0445\u043e\u0447\u043a\u043e\u0432\u044b\u0439!<\/p>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0432\u0441\u0435\u0439 \u043d\u0443\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u043e\u0441\u0430\u0442\u044c, \u043d\u043e&#8230; \u043e\u0439. \u041c\u044b \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0438 \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u0443\u0447\u043d\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0430\u0442\u044c&#8230;<\/p>\n<blockquote>\n<p>\u0422\u0430\u043a \u0442\u0440\u0443\u0434\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 Exception, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u043e\u0436\u0435\u0448\u044c \u0431\u0440\u043e\u0441\u0438\u0442\u044c&#8230;<\/p>\n<p>\u00a9 \u041d\u0435\u0438\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u0445 \u0446\u0438\u0442\u0430\u0442<\/p>\n<\/blockquote>\n<h3>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 NullPointerException<\/h3>\n<p>\u041d\u0435 \u043e\u0431\u043e\u0439\u0434\u0451\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u044e \u2014 \u043e\u0448\u0438\u0431\u043a\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f <code>null<\/code>.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 6<\/strong><\/p>\n<pre><code class=\"java\">private boolean replaceNodeStatus(   final NodeIdentifier<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-474743","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=474743"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474743\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=474743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=474743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=474743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}