Skip to content

Commit

Permalink
refactor(#463): deprecate ScopeCloseable in benefit of kotlin AutoClo…
Browse files Browse the repository at this point in the history
…seable
  • Loading branch information
romainbsl committed Jan 7, 2025
1 parent a032fb4 commit d65fe55
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ import org.kodein.di.internal.synchronizedIfNotNull
import org.kodein.di.internal.synchronizedIfNull
import org.kodein.type.TypeToken

public interface ScopeCloseable {
public fun close()
}
@Deprecated(
message = "Use kotlin AutoCloseable instead.",
replaceWith = ReplaceWith("AutoCloseable", imports = arrayOf("AutoCloseable"))
)
public typealias ScopeCloseable = AutoCloseable

private typealias RegKey = Any

/**
* A registry is responsible managing references inside a scope.
*/
@Suppress("DEPRECATION")
public sealed class ScopeRegistry : ScopeCloseable {
/**
* Get or create a value that correspond for the given key.
Expand Down

0 comments on commit d65fe55

Please sign in to comment.