Skip to content

Commit

Permalink
Changed kotlinx-metadata-jvm to kotlin-metadata-jvm
Browse files Browse the repository at this point in the history
  • Loading branch information
mskacelik authored and jmartisk committed Dec 11, 2024
1 parent 95641c9 commit 7b32640
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions common/schema-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@

<!-- Kotlin support -->
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-metadata-jvm</artifactId>
<version>${version.kotlinx.metadata.jvm}</version>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-metadata-jvm</artifactId>
<version>${version.kotlin.metadata.jvm}</version>
</dependency>

<!-- Logging -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<KmValueParameter> kotlinParameters,
Expand All @@ -196,7 +194,7 @@ private boolean compareParameterLists(List<KmValueParameter> 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;
}
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<version.impsort.plugin>1.8.0</version.impsort.plugin>
<version.kotlinx.metadata.jvm>0.9.0</version.kotlinx.metadata.jvm>
<version.kotlin.metadata.jvm>2.1.0</version.kotlin.metadata.jvm>
<version.kotlin.compiler>2.1.0</version.kotlin.compiler>

</properties>
Expand Down

0 comments on commit 7b32640

Please sign in to comment.