File tree Expand file tree Collapse file tree 3 files changed +3
-19
lines changed
jimmer-ksp/src/main/kotlin/org/babyfish/jimmer/ksp/immutable/generator Expand file tree Collapse file tree 3 files changed +3
-19
lines changed Original file line number Diff line number Diff line change 1
1
group =org.babyfish.jimmer
2
- version =0.9.98
2
+ version =0.9.99
Original file line number Diff line number Diff line change @@ -24,21 +24,6 @@ class ValidationGenerator(
24
24
prop.validationAnnotationMirrorMultiMap
25
25
26
26
fun generate () {
27
- val nullityAnnotations = prop.annotations {
28
- val shortName = it.shortName.asString()
29
- shortName == " NotNull" || shortName == " NonNull" ||
30
- shortName == " Nullable" || shortName == " Null" ||
31
- it.fullName == TNullable ::class .qualifiedName
32
- }
33
- if (nullityAnnotations.isNotEmpty()) {
34
- throw MetaException (
35
- prop.propDeclaration,
36
- null ,
37
- " it cannot be decorated by that annotation " +
38
- " '@${nullityAnnotations[0 ].fullName} ', " +
39
- " kotlin decides the nullity of property by language, not by annotation"
40
- )
41
- }
42
27
generateNotEmpty()
43
28
generateNotBlank()
44
29
generateSize()
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ private fun KSAnnotation.toAnnotationSpecWithoutSiteTarget(): AnnotationSpec =
130
130
toAnnotationSpec().toBuilder().useSiteTarget(null ).build()
131
131
132
132
private fun KSDeclaration.forFun (): Boolean =
133
- this .qualifiedName!! .asString().let { annoTypeName ->
133
+ this .qualifiedName? .asString()? .let { annoTypeName ->
134
134
annotations
135
135
.firstOrNull { it.fullName == Target ::class .qualifiedName }
136
136
?.getEnumListArgument(Target ::allowedTargets)
@@ -146,5 +146,4 @@ private fun KSDeclaration.forFun(): Boolean =
146
146
}
147
147
?.contains(ElementType .METHOD )
148
148
?.takeIf { it }
149
- ? : false
150
- }
149
+ } ? : false
You can’t perform that action at this time.
0 commit comments