Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit f7aacd8

Browse files
authored
Merge pull request #8 from k163377/feature
Update Kotlin and Shared version
2 parents 2815114 + 066b862 commit f7aacd8

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id("maven")
33
id("java")
4-
id("org.jetbrains.kotlin.jvm") version "1.3.61"
4+
id("org.jetbrains.kotlin.jvm") version "1.3.70"
55
id("org.jlleitschuh.gradle.ktlint") version "9.2.1"
66
}
77

@@ -18,7 +18,7 @@ buildscript {
1818
}
1919

2020
dependencies {
21-
classpath(kotlin("gradle-plugin", version = "1.3.61"))
21+
classpath(kotlin("gradle-plugin", version = "1.3.70"))
2222
}
2323
}
2424

@@ -30,7 +30,7 @@ repositories {
3030
dependencies {
3131
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
3232
implementation(kotlin("reflect"))
33-
implementation("com.github.ProjectMapK:Shared:0.1")
33+
implementation("com.github.ProjectMapK:Shared:0.2")
3434

3535
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter
3636
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter", version = "5.6.0") {

src/main/kotlin/com/mapk/kmapper/KMapper.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ class KMapper<T : Any> private constructor(
3939
ParameterForMap.newInstance(it)
4040
}
4141

42-
init {
43-
if (parameterMap.isEmpty()) throw IllegalArgumentException("This function is not require arguments.")
44-
}
45-
4642
private fun throwExceptionOnNotInitialized(argumentBucket: ArgumentBucket): Nothing {
4743
val notInitializedIndexes = argumentBucket.notInitializedParameterIndexes
4844
function.parameters
@@ -149,8 +145,7 @@ internal fun <T : Any> getTarget(clazz: KClass<T>): KFunctionForCall<T> {
149145
.map { KFunctionForCall(
150146
it,
151147
companionObject
152-
) as KFunctionForCall<T>
153-
}
148+
) as KFunctionForCall<T> }
154149
} ?: emptyList()
155150

156151
val constructors: List<KFunctionForCall<T>> = factoryConstructor + clazz.constructors

0 commit comments

Comments
 (0)