Skip to content

Commit

Permalink
better name for check
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjozork committed Nov 3, 2019
1 parent e61bb03 commit 2b6df7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/blogify/backend/annotations/check.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import org.intellij.lang.annotations.Language
@Retention(AnnotationRetention.RUNTIME)
@MustBeDocumented
annotation class check (
@Language(value = "RegExp") val check: String
@Language(value = "RegExp") val pattern: String
)
2 changes: 1 addition & 1 deletion src/blogify/backend/resources/slicing/Mapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fun <M : Mapped> KClass<M>.buildPropMap(): PropMap {
PropertyHandle.AccessDenied(name)
} else {
if (self.returnType.findAnnotation<check>() != null) {
val regex = Regex(self.returnType.findAnnotation<check>()!!.check)
val regex = Regex(self.returnType.findAnnotation<check>()!!.pattern)
PropertyHandle.Ok(name, regex, self as KProperty1<Any, Any>)
} else {
PropertyHandle.Ok(name, null, self as KProperty1<Any, Any>)
Expand Down

0 comments on commit 2b6df7e

Please sign in to comment.