Skip to content

Commit

Permalink
Make asMap() experimental with a new ExperimentalHeadersApi annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
joffrey-bion committed Sep 18, 2024
1 parent 1f14b1f commit d2fdcc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions krossbow-stomp-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ kotlin {
freeCompilerArgs.add("-Xexpect-actual-classes") // for charsets
}
languageSettings.optIn("org.hildan.krossbow.io.InternalKrossbowIoApi")
languageSettings.optIn("org.hildan.krossbow.stomp.headers.ExperimentalHeadersApi")
}
val commonMain by getting {
dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import org.hildan.krossbow.stomp.headers.HeaderNames.CONTENT_LENGTH
import org.hildan.krossbow.stomp.headers.HeaderNames.CONTENT_TYPE
import org.hildan.krossbow.stomp.headers.HeaderNames.RECEIPT

/**
* Declarations annotated with this annotation are unstable and may be changed or removed at any time without a major
* version bump.
*/
@RequiresOptIn("This API is experimental and may be changed or removed in the future without notice.")
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
annotation class ExperimentalHeadersApi

/**
* The headers of a STOMP frame.
*/
Expand Down Expand Up @@ -50,6 +58,7 @@ sealed interface StompHeaders {
/**
* Returns a [Map] view of these headers.
*/
@ExperimentalHeadersApi
fun asMap(): Map<String, String>
}

Expand Down

0 comments on commit d2fdcc2

Please sign in to comment.