Class SerdeTomlConfiguration.ReadConstraints

java.lang.Object
io.micronaut.serde.toml.support.SerdeTomlConfiguration.ReadConstraints
Enclosing class:
SerdeTomlConfiguration

@ConfigurationProperties("read-constraints") public static final class SerdeTomlConfiguration.ReadConstraints extends Object
TOML read constraints.
Since:
3.0.1
  • Field Details

    • DEFAULT_MAX_DOCUMENT_SIZE

      public static final int DEFAULT_MAX_DOCUMENT_SIZE
      Guarding against memory exhaustion before parsing a Toml Document, DOS attacks. Configure a non-positive value to disable the limit.
      See Also:
  • Constructor Details

    • ReadConstraints

      public ReadConstraints()
  • Method Details

    • getMaxNumberLength

      public @Nullable Integer getMaxNumberLength()
      Returns:
      The maximum number token length, or null to use the default
    • setMaxNumberLength

      public void setMaxNumberLength(@Nullable Integer maxNumberLength)
      Parameters:
      maxNumberLength - The maximum number token length
    • getMaxStringLength

      public @Nullable Integer getMaxStringLength()
      Returns:
      The maximum string value length, or null for no limit
    • setMaxStringLength

      public void setMaxStringLength(@Nullable Integer maxStringLength)
      Parameters:
      maxStringLength - The maximum string value length
    • getMaxDocumentSize

      public @Nullable Integer getMaxDocumentSize()
      Returns:
      The maximum document size in bytes, or null/non-positive for no limit
    • setMaxDocumentSize

      public void setMaxDocumentSize(@Nullable Integer maxDocumentSize)
      Parameters:
      maxDocumentSize - The maximum document size in bytes (null or non-positive disables the limit)