Small cleanup in Contexts class

This commit is contained in:
Luck 2018-12-10 15:33:57 +00:00
parent 1aabd7610e
commit 085e7af681
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -219,7 +219,7 @@ public class Contexts {
if (this.contextSet.equals(cs)) {
return this;
}
return new Contexts(Objects.requireNonNull(contextSet, "contextSet").makeImmutable(), this.settingsFlag);
return new Contexts(cs, this.settingsFlag);
}
/**
@ -237,7 +237,7 @@ public class Contexts {
if (this.settingsFlag == settingsFlag) {
return this;
}
if (this.contextSet.isEmpty() && DEFAULT_SETTINGS_FLAG == settingsFlag) {
if (DEFAULT_SETTINGS_FLAG == settingsFlag && this.contextSet.isEmpty()) {
return GLOBAL;
}