Removed unnecessary boxing/unboxing

Closes #39987

Signed-off-by: Anchels <mishtitov@gmail.com>
This commit is contained in:
Anchels 2025-05-27 11:06:54 +00:00 committed by Marek Posolda
parent 669cc2533c
commit 4fc065aadc
4 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ public class SAMLEncryptionMethodParser extends AbstractStaxSamlMetadataParser<E
case KEY_SIZE:
{
StaxParserUtil.advance(xmlEventReader);
BigInteger keySize = BigInteger.valueOf(Long.valueOf(StaxParserUtil.getElementText(xmlEventReader)));
BigInteger keySize = BigInteger.valueOf(Long.parseLong(StaxParserUtil.getElementText(xmlEventReader)));
EncryptionMethodType.EncryptionMethod encMethod = target.getEncryptionMethod();
if (encMethod == null) {

View File

@ -190,7 +190,7 @@ public class XMLTimeUtil {
if (timeValue.startsWith("P")) {
return factory.newDuration(timeValue);
} else {
return factory.newDuration(Long.valueOf(timeValue));
return factory.newDuration(Long.parseLong(timeValue));
}
} catch (Exception e) {
throw logger.samlMetaDataFailedToCreateCacheDuration(timeValue);

View File

@ -99,12 +99,12 @@ public class ComponentModel {
public int get(String key, int defaultValue) {
String s = get(key);
return s != null ? Integer.valueOf(s) : defaultValue;
return s != null ? Integer.parseInt(s) : defaultValue;
}
public long get(String key, long defaultValue) {
String s = get(key);
return s != null ? Long.valueOf(s) : defaultValue;
return s != null ? Long.parseLong(s) : defaultValue;
}
public boolean get(String key, boolean defaultValue) {

View File

@ -41,7 +41,7 @@ public class PrioritizedComponentModel extends ComponentModel {
public static int parsePriority(ComponentModel component) {
String priority = component.getConfig().getFirst(PRIORITY);
if (priority == null) return 0;
return Integer.valueOf(priority);
return Integer.parseInt(priority);
}