Quick fix for NPE in PageMemoryImpl.loadedPages
@@ -1014,7 +1014,13 @@ public class PageMemoryImpl implements PageMemoryEx {
@Override public long loadedPages() {
long total = 0;
+ Segment[] segments = this.segments;
+
+ if (segments != null) {
for (Segment seg : segments) {
+ if (seg == null)
+ break;
+
seg.readLock().lock();
try {
@@ -1024,6 +1030,7 @@ public class PageMemoryImpl implements PageMemoryEx {
seg.readLock().unlock();
}
}
+ }
return total;
}
