public class LoaderOptions extends Object
Constructor and Description |
---|
LoaderOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowRecursiveKeys() |
int |
getMaxAliasesForCollections() |
boolean |
isAllowDuplicateKeys() |
boolean |
isWrappedToRootException() |
void |
setAllowDuplicateKeys(boolean allowDuplicateKeys)
Allow/Reject duplicate map keys in the YAML file.
|
void |
setAllowRecursiveKeys(boolean allowRecursiveKeys)
Allow recursive keys for mappings.
|
void |
setMaxAliasesForCollections(int maxAliasesForCollections)
Restrict the amount of aliases for collections (sequences and mappings) to avoid https://en.wikipedia.org/wiki/Billion_laughs_attack
|
void |
setWrappedToRootException(boolean wrappedToRootException)
Wrap runtime exception to YAMLException during parsing or leave them as they are
Default is to leave original exceptions
|
public boolean isAllowDuplicateKeys()
public void setAllowDuplicateKeys(boolean allowDuplicateKeys)
allowDuplicateKeys
- false to reject duplicate mapping keyspublic boolean isWrappedToRootException()
public void setWrappedToRootException(boolean wrappedToRootException)
wrappedToRootException
- - true to convert runtime exception to YAMLExceptionpublic int getMaxAliasesForCollections()
public void setMaxAliasesForCollections(int maxAliasesForCollections)
maxAliasesForCollections
- set max allowed value (50 by default)public void setAllowRecursiveKeys(boolean allowRecursiveKeys)
allowRecursiveKeys
- - false to disable recursive keyspublic boolean getAllowRecursiveKeys()
Copyright © 2008–2020. All rights reserved.