@@ -118,21 +118,22 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
118
118
*/
119
119
private void checkIndex (RuntimeEnvironment env ) {
120
120
if (env .isProjectsEnabled ()) {
121
- LOGGER .log (Level .FINE , "Checking indexes for all projects" );
122
121
Map <String , Project > projects = env .getProjects ();
123
122
File indexRoot = new File (env .getDataRootPath (), IndexDatabase .INDEX_DIR );
124
123
if (indexRoot .exists ()) {
125
- projects .keySet ().forEach (projectName -> {
124
+ LOGGER .log (Level .FINE , "Checking indexes for all projects" );
125
+ for (Map .Entry <String , Project > projectEntry : projects .entrySet ()) {
126
126
try {
127
- IndexCheck .checkDir (new File (indexRoot , projectName ));
127
+ IndexCheck .checkDir (new File (indexRoot , projectEntry . getKey () ));
128
128
} catch (Exception e ) {
129
129
LOGGER .log (Level .WARNING ,
130
- String .format ("Project %s index check failed, marking as not indexed" , projectName ), e );
131
- projects .get (projectName ).setIndexed (false );
130
+ String .format ("Project %s index check failed, marking as not indexed" ,
131
+ projectEntry .getKey ()), e );
132
+ projectEntry .getValue ().setIndexed (false );
132
133
}
133
- });
134
+ }
135
+ LOGGER .log (Level .FINE , "Index check for all projects done" );
134
136
}
135
- LOGGER .log (Level .FINE , "Index check for all projects done" );
136
137
} else {
137
138
LOGGER .log (Level .FINE , "Checking index" );
138
139
try {
0 commit comments