bbende commented on a change in pull request #231: NIFIREG-320 - Added jetty 
header filters to set security headers. Set…
URL: https://github.com/apache/nifi-registry/pull/231#discussion_r328337564
 
 

 ##########
 File path: 
nifi-registry-core/nifi-registry-jetty/src/main/java/org/apache/nifi/registry/jetty/JettyServer.java
 ##########
 @@ -106,6 +112,37 @@ public JettyServer(final NiFiRegistryProperties 
properties, final CryptoKeyProvi
         }
     }
 
+    /**
+     * Returns a File object for the directory containing NIFI documentation.
+     * <p>
+     * Formerly, if the docsDirectory did not exist NIFI would fail to start
+     * with an IllegalStateException and a rather unhelpful log message.
+     * NIFI-2184 updates the process such that if the docsDirectory does not
+     * exist an attempt will be made to create the directory. If that is
+     * successful NIFI will no longer fail and will start successfully barring
+     * any other errors. The side effect of the docsDirectory not being present
+     * is that the documentation links under the 'General' portion of the help
+     * page will not be accessible, but at least the process will be running.
+     *
+     * @param docsDirectory Name of documentation directory in installation 
directory.
+     * @return A File object to the documentation directory; else 
startUpFailure called.
+     */
+    private File getDocsDir(final String docsDirectory) {
 
 Review comment:
   I'm wondering if this change was really needed... looking at lines 383-394 
of the original code, it looks like the logic there was basically the same that 
is in this method.
   
   Was there anything else that was being fixed by changing the way the docs 
webapp was being loaded?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to