Skip to content

Commit 5154713

Browse files
authored
Remove @JvmField uses from commonMain (#1490)
* Remove @JvmField from common Buffer.kt These annotations are unnecessary and break under Kotlin -language-mode=2.0 * Remove @JvmField from common ByteString.kt These annotations are unnecessary and break under Kotlin -language-mode=2.0
1 parent 5d09e84 commit 5154713

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

okio/src/commonMain/kotlin/okio/Buffer.kt

+6-8
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package okio
1717

18-
import kotlin.jvm.JvmField
19-
2018
/**
2119
* A collection of bytes in memory.
2220
*
@@ -341,19 +339,19 @@ expect class Buffer() : BufferedSource, BufferedSink {
341339
* [Buffer.readAndWriteUnsafe] that take a cursor and close it after use.
342340
*/
343341
class UnsafeCursor constructor() : Closeable {
344-
@JvmField var buffer: Buffer?
342+
var buffer: Buffer?
345343

346-
@JvmField var readWrite: Boolean
344+
var readWrite: Boolean
347345

348346
internal var segment: Segment?
349347

350-
@JvmField var offset: Long
348+
var offset: Long
351349

352-
@JvmField var data: ByteArray?
350+
var data: ByteArray?
353351

354-
@JvmField var start: Int
352+
var start: Int
355353

356-
@JvmField var end: Int
354+
var end: Int
357355

358356
/**
359357
* Seeks to the next range of bytes, advancing the offset by `end - start`. Returns the size of

okio/src/commonMain/kotlin/okio/ByteString.kt

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package okio
1818

19-
import kotlin.jvm.JvmField
2019
import kotlin.jvm.JvmName
2120
import kotlin.jvm.JvmOverloads
2221
import kotlin.jvm.JvmStatic
@@ -183,7 +182,6 @@ internal constructor(data: ByteArray) : Comparable<ByteString> {
183182

184183
companion object {
185184
/** A singleton empty `ByteString`. */
186-
@JvmField
187185
val EMPTY: ByteString
188186

189187
/** Returns a new byte string containing a clone of the bytes of `data`. */

0 commit comments

Comments
 (0)