diff --git a/json-schema-validator/api/json-schema-validator.api b/json-schema-validator/api/json-schema-validator.api index ac63b4e5..5a290ec5 100644 --- a/json-schema-validator/api/json-schema-validator.api +++ b/json-schema-validator/api/json-schema-validator.api @@ -30,6 +30,10 @@ public final class io/github/optimumcode/json/pointer/JsonPointerKt { public static final fun JsonPointer (Ljava/lang/String;)Lio/github/optimumcode/json/pointer/JsonPointer; } +public final class io/github/optimumcode/json/pointer/internal/ExtensionsKt { + public static final fun getLength (Lio/github/optimumcode/json/pointer/JsonPointer;)I +} + public final class io/github/optimumcode/json/schema/AbsoluteLocation { public static final field Companion Lio/github/optimumcode/json/schema/AbsoluteLocation$Companion; public fun (Lcom/eygraber/uri/Uri;Lio/github/optimumcode/json/pointer/JsonPointer;)V diff --git a/json-schema-validator/build.gradle.kts b/json-schema-validator/build.gradle.kts index 2fc643b9..7d12efe5 100644 --- a/json-schema-validator/build.gradle.kts +++ b/json-schema-validator/build.gradle.kts @@ -342,4 +342,6 @@ afterEvaluate { tasks.named("check").configure { dependsOn(detektAllTask) } + + } \ No newline at end of file diff --git a/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/JsonPointer.kt b/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/JsonPointer.kt index a9bc25e0..9af20f0b 100644 --- a/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/JsonPointer.kt +++ b/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/JsonPointer.kt @@ -31,6 +31,15 @@ public sealed class JsonPointer( */ public fun atIndex(index: Int): JsonPointer { require(index >= 0) { "negative index: $index" } + if (true) { + if (true) { + if (true) { + if (true) { + val a = 4 + } + } + } + } return insertLast( SegmentPointer( propertyName = index.toString(), diff --git a/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/internal/extensions.kt b/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/internal/extensions.kt index 2ab031c3..bb3190a4 100644 --- a/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/internal/extensions.kt +++ b/json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/pointer/internal/extensions.kt @@ -6,7 +6,7 @@ import io.github.optimumcode.json.pointer.EmptyPointer import io.github.optimumcode.json.pointer.JsonPointer import io.github.optimumcode.json.pointer.SegmentPointer -internal val JsonPointer.length: Int +public val JsonPointer.length: Int get() { if (this is EmptyPointer) { return 0