Package com.atlassian.crowd.util
Class AttributeUtil
java.lang.Object
com.atlassian.crowd.util.AttributeUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic DurationsafeParseDurationMillis(String attribute, Duration defaultDuration) Returns the value of the provided string parsed as a duration or returns the fallback value if the attribute cannot be parsed or is null.
-
Method Details
-
safeParseDurationMillis
Returns the value of the provided string parsed as a duration or returns the fallback value if the attribute cannot be parsed or is null. The provided string is assumed to be in milliseconds.- Parameters:
attribute- the string to parsedefaultDuration- the default duration to be used if the attribute cannot be parsed.- Returns:
- the successfully parsed value or the provided default
-