/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2020 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
-import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.BaseJobsBean;
/**
* A feature bean
*/
@Named ("featureController")
@ApplicationScoped
-public class JobsFeatureWebApplicationBean extends BaseJobsController implements JobsFeaturesWebApplicationController {
+public class JobsFeatureWebApplicationBean extends BaseJobsBean implements JobsFeaturesWebApplicationController {
/**
* Serial number
// Default is not enabled
boolean isEnabled = false;
- // Try it as an NPE may come
- try {
- // Get value from property
- String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
+ // Get value from property
+ final String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
+ // Is the context parameter found?
+ if (contextParameter instanceof String) {
// Is it set?
isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE);
- } catch (final NullPointerException ex) {
- // Ignored
}
- // Return value
+ // Return status
return isEnabled;
}