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

[둘리] 1단계 자동 DI 미션 제출합니다 #5

Merged
merged 18 commits into from
Sep 5, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
rename: 변수 네이밍 수정
  • Loading branch information
hyemdooly committed Sep 3, 2023
commit aab65d637e130db6e7e0f2bfd7ed96e29bd02c31
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class ViewModelFactory : ViewModelProvider.Factory {
val types = constructor.parameterTypes
val params = mutableListOf<Any?>()

val applicationProperties = RepositoryModule::class.java.declaredFields
val properties = RepositoryModule::class.java.declaredFields
for (type in types) {
val field = applicationProperties.first { it.type == type }
val field = properties.first { it.type == type }
?: throw IllegalArgumentException("Can't find Property $type")
field.isAccessible = true
params.add(field.get(null))
Expand Down