mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Removed unnecessary boxing/unboxing
Closes #39987 Signed-off-by: Anchels <mishtitov@gmail.com>
This commit is contained in:
parent
669cc2533c
commit
4fc065aadc
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user