Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed kotlinx-metadata-jvm to kotlin-metadata-jvm #2239

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading