From c08f5802440bbd3e3d8c2ac7fca6f4f1d1e021ae Mon Sep 17 00:00:00 2001 From: Marek Skacelik Date: Wed, 11 Dec 2024 10:39:36 +0100 Subject: [PATCH] Changed kotlinx-metadata-jvm to kotlin-metadata-jvm --- common/schema-builder/pom.xml | 6 ++--- .../schema/creator/OperationCreator.java | 24 +++++++++---------- pom.xml | 2 +- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/common/schema-builder/pom.xml b/common/schema-builder/pom.xml index b3c6bf052..affee430a 100644 --- a/common/schema-builder/pom.xml +++ b/common/schema-builder/pom.xml @@ -38,9 +38,9 @@ - org.jetbrains.kotlinx - kotlinx-metadata-jvm - ${version.kotlinx.metadata.jvm} + org.jetbrains.kotlin + kotlin-metadata-jvm + ${version.kotlin.metadata.jvm} diff --git a/common/schema-builder/src/main/java/io/smallrye/graphql/schema/creator/OperationCreator.java b/common/schema-builder/src/main/java/io/smallrye/graphql/schema/creator/OperationCreator.java index 2f2a84634..c8b771275 100644 --- a/common/schema-builder/src/main/java/io/smallrye/graphql/schema/creator/OperationCreator.java +++ b/common/schema-builder/src/main/java/io/smallrye/graphql/schema/creator/OperationCreator.java @@ -25,14 +25,14 @@ import io.smallrye.graphql.schema.model.Operation; import io.smallrye.graphql.schema.model.OperationType; import io.smallrye.graphql.schema.model.Reference; -import kotlinx.metadata.Flag; -import kotlinx.metadata.KmClassifier; -import kotlinx.metadata.KmFunction; -import kotlinx.metadata.KmType; -import kotlinx.metadata.KmTypeProjection; -import kotlinx.metadata.KmValueParameter; -import kotlinx.metadata.jvm.KotlinClassHeader; -import kotlinx.metadata.jvm.KotlinClassMetadata; +import kotlin.metadata.Attributes; +import kotlin.metadata.KmClassifier; +import kotlin.metadata.KmFunction; +import kotlin.metadata.KmType; +import kotlin.metadata.KmTypeProjection; +import kotlin.metadata.KmValueParameter; +import kotlin.metadata.jvm.KotlinClassHeader; +import kotlin.metadata.jvm.KotlinClassMetadata; /** * Creates a Operation object @@ -176,9 +176,7 @@ private static boolean isKotlinWrappedTypeNullable(KmType kotlinType) { return false; } KmTypeProjection arg = kotlinType.getArguments().get(0); - int flags = arg.getType().getFlags(); - boolean nullable = Flag.Type.IS_NULLABLE.invoke(flags); - return nullable; + return Attributes.isNullable(arg.getType()); } private boolean compareParameterLists(List kotlinParameters, @@ -196,7 +194,7 @@ private boolean compareParameterLists(List kotlinParameters, return true; } - private boolean compareJavaAndKotlinType(Type javaType, kotlinx.metadata.KmType kotlinType) { + private boolean compareJavaAndKotlinType(Type javaType, kotlin.metadata.KmType kotlinType) { if (kotlinType == null) { return false; } @@ -261,7 +259,7 @@ private KotlinClassMetadata.Class toKotlinClassMetadata(AnnotationInstance metad metadata.value("xs") != null ? metadata.value("xs").asString() : null, metadata.value("pn") != null ? metadata.value("pn").asString() : null, metadata.value("xi").asInt()); - return (KotlinClassMetadata.Class) KotlinClassMetadata.read(classHeader); + return (KotlinClassMetadata.Class) KotlinClassMetadata.readStrict(classHeader); } private static void validateFieldType(MethodInfo methodInfo, OperationType operationType) { diff --git a/pom.xml b/pom.xml index 3000d9b86..2642b2dba 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ 17 17 1.8.0 - 0.9.0 + 2.1.0 2.1.0