Skip to content

Commit

Permalink
Fix Java interoperability issues with RuleId and RuleSetId classe…
Browse files Browse the repository at this point in the history
…s. Those classes were defined as value classes in `0.49.0` and `0.49.1`. Although the classes were marked with `@JvmInline` it seems that it is not possible to uses those classes from Java base API Consumers like Spotless. The classes have now been replaced with data classes. (#2042)

Closes #2041
  • Loading branch information
paul-dingemans authored May 19, 2023
1 parent 2a9e1e3 commit ec40528
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Changed

* Fix Java interoperability issues with `RuleId` and `RuleSetId` classes. Those classes were defined as value classes in `0.49.0` and `0.49.1`. Although the classes were marked with `@JvmInline` it seems that it is not possible to uses those classes from Java base API Consumers like Spotless. The classes have now been replaced with data classes ([#2041](https://github.com/pinterest/ktlint/issues/2041))
* Update dependency `info.picocli:picocli` to v4.7.3
* Update dependency `org.junit.jupiter:junit-jupiter` to v5.9.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import com.pinterest.ktlint.rule.engine.core.api.editorconfig.EditorConfigProper
import com.pinterest.ktlint.rule.engine.core.internal.IdNamingPolicy
import org.jetbrains.kotlin.com.intellij.lang.ASTNode

@JvmInline
public value class RuleId(public val value: String) {
public data class RuleId(public val value: String) {
init {
IdNamingPolicy.enforceRuleIdNaming(value)
}
Expand All @@ -27,8 +26,7 @@ public value class RuleId(public val value: String) {
}
}

@JvmInline
public value class RuleSetId(public val value: String) {
public data class RuleSetId(public val value: String) {
init {
IdNamingPolicy.enforceRuleSetIdNaming(value)
}
Expand Down

0 comments on commit ec40528

Please sign in to comment.