@@ -105,7 +105,7 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
105
105
}
106
106
107
107
// Check index(es).
108
- check_index (env );
108
+ checkIndex (env );
109
109
110
110
env .startExpirationTimer ();
111
111
startupTimer .record (Duration .between (start , Instant .now ()));
@@ -116,21 +116,21 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
116
116
* is marked as not being indexed.
117
117
* @param env runtime environment
118
118
*/
119
- private void check_index (RuntimeEnvironment env ) {
119
+ private void checkIndex (RuntimeEnvironment env ) {
120
120
if (env .isProjectsEnabled ()) {
121
121
LOGGER .log (Level .FINE , "Checking indexes for all projects" );
122
122
Map <String , Project > projects = env .getProjects ();
123
123
File indexRoot = new File (env .getDataRootPath (), IndexDatabase .INDEX_DIR );
124
124
if (indexRoot .exists ()) {
125
- for ( String projectName : projects .keySet ()) {
125
+ projects .keySet (). forEach ( projectName -> {
126
126
try {
127
127
IndexCheck .checkDir (new File (indexRoot , projectName ));
128
128
} catch (Exception e ) {
129
129
LOGGER .log (Level .WARNING ,
130
130
String .format ("Project %s index check failed, marking as not indexed" , projectName ), e );
131
131
projects .get (projectName ).setIndexed (false );
132
132
}
133
- }
133
+ });
134
134
}
135
135
LOGGER .log (Level .FINE , "Index check for all projects done" );
136
136
} else {
0 commit comments