Fix NPE caused by generating the wrong ExtractedContexts type - closes #185

This commit is contained in:
Luck 2017-02-16 21:43:27 +00:00
parent 8d86eed0a7
commit f97aa651a0
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -452,7 +452,7 @@ public class LuckPermsSubjectData implements LPSubjectData {
} catch (ObjectLacksException ignored) {} } catch (ObjectLacksException ignored) {}
}); });
MetaHolder metaHolder = holder.accumulateMeta(null, null, ExtractedContexts.generate(context)); MetaHolder metaHolder = holder.accumulateMeta(null, null, ExtractedContexts.generate(service.calculateContexts(context)));
int priority = (type.equals("prefix") ? metaHolder.getPrefixes() : metaHolder.getSuffixes()).keySet().stream() int priority = (type.equals("prefix") ? metaHolder.getPrefixes() : metaHolder.getSuffixes()).keySet().stream()
.mapToInt(e -> e).max().orElse(0); .mapToInt(e -> e).max().orElse(0);
priority += 10; priority += 10;