final String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
// Default is not enabled
- final boolean isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE);
+ final boolean isEnabled = Boolean.parseBoolean(contextParameter);
// Return status
return isEnabled;
// Try this better
try {
// Convert it to long
- final Long countryId = Long.parseLong(submittedValue);
+ final Long countryId = Long.valueOf(submittedValue);
// Category id should not be below 1
assert (countryId > 0) : "countryId is smaller than one: " + countryId; //NOI18N
// Try this better
try {
// Convert it to long
- final Long providerId = Long.parseLong(submittedValue);
+ final Long providerId = Long.valueOf(submittedValue);
// Category id should not be below 1
assert (providerId > 0) : "providerId is smaller than one: " + providerId; //NOI18N
}
// Securely cast it
- checkExisting = Boolean.parseBoolean((String) attribute);
+ checkExisting = Boolean.valueOf((String) attribute);
}
// Check if name is already used
// No, then try to ...
try {
// ..parse as number
- final Long number = Long.parseLong(dialNumber);
+ final Long number = Long.valueOf(dialNumber);
// Not valid range? (1 - 99, very rude)
if (number < 1 || number > 99) {