- fixed some issues reported by Netbeans' inspector, like Foo.parseFoo() versus
Foo.valueOf()
final String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
// Default is not enabled
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;
// Return status
return isEnabled;
// Try this better
try {
// Convert it to long
// Try this better
try {
// Convert it to long
- final Long countryId = Long.parseLong(submittedValue);
+ final Long countryId = Long.valueOf(submittedValue);
// Try to find it
country = COUNTRY_LIST_CONTROLLER.findCountryById(countryId);
// Try to find it
country = COUNTRY_LIST_CONTROLLER.findCountryById(countryId);
// Try this better
try {
// Convert it to long
// Try this better
try {
// Convert it to long
- final Long providerId = Long.parseLong(submittedValue);
+ final Long providerId = Long.valueOf(submittedValue);
// Lookup of mobile provider
mobileProvider = MOBILE_PROVIDER_LIST_CONTROLLER.findMobileProviderById(providerId);
// Lookup of mobile provider
mobileProvider = MOBILE_PROVIDER_LIST_CONTROLLER.findMobileProviderById(providerId);
- checkExisting = Boolean.parseBoolean((String) attribute);
+ checkExisting = Boolean.valueOf((String) attribute);
}
// Check if name is already used
}
// Check if name is already used
- checkExisting = Boolean.parseBoolean((String) attribute);
+ checkExisting = Boolean.valueOf((String) attribute);
}
// Is the instance there?
}
// Is the instance there?
- checkExisting = Boolean.parseBoolean((String) attribute);
+ checkExisting = Boolean.valueOf((String) attribute);
}
// Check if name is already used
}
// Check if name is already used
- checkExisting = Boolean.parseBoolean((String) attribute);
+ checkExisting = Boolean.valueOf((String) attribute);
}
// Is the instance there?
}
// Is the instance there?
// No, then try to ...
try {
// ..parse as number
// 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) {
// Not valid range? (1 - 99, very rude)
if (number < 1 || number > 99) {