Skip to content

Commit

Permalink
field should be nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxcapades committed Nov 1, 2022
1 parent 445d8b1 commit a994fe9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "org.veupathdb.lib.s3"
version = "0.3.5+s34k-0.7.2"
version = "0.3.6+s34k-0.7.2"

java {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ import org.veupathdb.lib.s3.s34k.fields.RetentionMode
import io.minio.messages.LegalHold as MHold
import io.minio.messages.RetentionMode as MRMode

internal inline fun MHold.toS34K() = if (status()) LegalHold.On else LegalHold.Off
internal inline fun MHold?.toS34K() =
if (this == null)
null
else if (status())
LegalHold.On
else
LegalHold.Off

internal inline fun MRMode.toS34K() =
internal inline fun MRMode?.toS34K() =
when (this) {
null -> null
MRMode.GOVERNANCE -> RetentionMode.Governance
MRMode.COMPLIANCE -> RetentionMode.Compliance
}
2 changes: 1 addition & 1 deletion test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation("org.slf4j:slf4j-api:1.7.36")
implementation("io.minio:minio:8.4.5")

implementation("org.veupathdb.lib.s3:s34k-minio:0.3.5+s34k-0.7.2")
implementation("org.veupathdb.lib.s3:s34k-minio:0.3.6+s34k-0.7.2")

implementation("org.apache.logging.log4j:log4j-core:2.19.0")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.19.0")
Expand Down

0 comments on commit a994fe9

Please sign in to comment.