Skip to content

Commit 018eaed

Browse files
committed
Fix NPE in ksp processing (#862)
1 parent b859ea1 commit 018eaed

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

querydsl-tooling/querydsl-ksp-codegen/src/main/kotlin/com/querydsl/ksp/codegen/QueryDslProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class QueryDslProcessor(
3636
.writeTo(
3737
codeGenerator = codeGenerator,
3838
aggregating = false,
39-
originatingKSFiles = listOf(model.originatingFile)
39+
originatingKSFiles = listOfNotNull(model.originatingFile)
4040
)
4141
}
4242
}

querydsl-tooling/querydsl-ksp-codegen/src/main/kotlin/com/querydsl/ksp/codegen/QueryModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class QueryModel(
88
val typeParameterCount: Int,
99
val className: ClassName,
1010
val type: QueryModelType,
11-
val originatingFile: KSFile
11+
val originatingFile: KSFile?
1212
) {
1313
var superclass: QueryModel? = null
1414

querydsl-tooling/querydsl-ksp-codegen/src/main/kotlin/com/querydsl/ksp/codegen/QueryModelExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class QueryModelExtractor(
112112
typeParameterCount = classDeclaration.typeParameters.size,
113113
className = queryClassName(classDeclaration, settings),
114114
type = type,
115-
originatingFile = classDeclaration.containingFile!!
115+
originatingFile = classDeclaration.containingFile
116116
)
117117
}
118118

0 commit comments

Comments
 (0)