Skip to content

Commit 24ac080

Browse files
author
Vitaliy Boyko
committed
Fixed null pointer exception
1 parent cd4a9f9 commit 24ac080

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/com/magento/idea/magento2plugin/indexes/IndexManager.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
import com.magento.idea.magento2plugin.stubs.indexes.mftf.*;
1515
import com.magento.idea.magento2plugin.stubs.indexes.xml.PhpClassNameIndex;
1616

17-
/**
18-
* Created by dkvashnin on 1/9/16.
19-
*/
2017
public class IndexManager {
2118
public static void manualReindex() {
2219
ID<?, ?>[] indexIds = new ID<?, ?>[] {
@@ -49,8 +46,12 @@ public static void manualReindex() {
4946
};
5047

5148
for (ID<?, ?> id: indexIds) {
52-
FileBasedIndexImpl.getInstance().requestRebuild(id);
53-
FileBasedIndexImpl.getInstance().scheduleRebuild(id, new Throwable());
49+
try {
50+
FileBasedIndexImpl.getInstance().requestRebuild(id);
51+
FileBasedIndexImpl.getInstance().scheduleRebuild(id, new Throwable());
52+
} catch (NullPointerException exception) {
53+
//that's fine, indexer is not present in map java.util.Map.get
54+
}
5455
}
5556
}
5657
}

0 commit comments

Comments
 (0)