oopsie!!!!!!!!!

This commit is contained in:
Lee 2024-07-07 01:12:22 +01:00
parent 585d3e0793
commit 8f85ce91da

View File

@ -5,6 +5,7 @@ import com.google.gson.Gson;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.bson.Document;
import java.util.HashMap;
@ -25,9 +26,9 @@ public class FeatureProfile extends Serializable {
*
* @return the feature states
*/
public FeatureState getFeatureState(Feature feature) {
if (feature == null) {
return FeatureProfile.FeatureState.DISABLED;
public FeatureState getFeatureState(@NonNull Feature feature) {
if (!feature.isCanBeDisabled()) {
return FeatureProfile.FeatureState.ENABLED;
}
String featureName = feature.getName().toUpperCase();
if (!this.featureStates.containsKey(featureName)) {