File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis
opengrok-web/src/main/java/org/opengrok/web Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,11 @@ public List<String> getArgv() {
148148 }
149149
150150 private void initialize () {
151+ /*
152+ * Call the following principally to properly initialize when running
153+ * JUnit tests. opengrok-indexer and opengrok-web call it too but
154+ * validating its return code and logging (and possibly aborting).
155+ */
151156 env .validateUniversalCtags ();
152157
153158 command = new ArrayList <>();
Original file line number Diff line number Diff line change 1919
2020/*
2121 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
22- * Portions Copyright (c) 2018, Chris Fraire <cfraire@me.com>.
22+ * Portions Copyright (c) 2018-2019 , Chris Fraire <cfraire@me.com>.
2323 */
2424package org .opengrok .web ;
2525
@@ -77,14 +77,18 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
7777 }
7878 }
7979
80- /**
80+ /*
8181 * Create a new instance of authorization framework. If the code above
8282 * (reading the configuration) failed then the plugin directory is
8383 * possibly {@code null} causing the framework to allow every request.
8484 */
8585 env .setAuthorizationFramework (new AuthorizationFramework (env .getPluginDirectory (), env .getPluginStack ()));
8686 env .getAuthorizationFramework ().reload ();
8787
88+ if (env .isWebappCtags () && !env .validateUniversalCtags ()) {
89+ LOGGER .warning ("Didn't find Universal Ctags for --webappCtags" );
90+ }
91+
8892 try {
8993 loadStatistics ();
9094 } catch (IOException ex ) {
@@ -93,7 +97,7 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
9397
9498 String pluginDirectory = env .getPluginDirectory ();
9599 if (pluginDirectory != null && env .isAuthorizationWatchdog ()) {
96- RuntimeEnvironment . getInstance () .watchDog .start (new File (pluginDirectory ));
100+ env .watchDog .start (new File (pluginDirectory ));
97101 }
98102
99103 env .startExpirationTimer ();
You can’t perform that action at this time.
0 commit comments