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

Kotlin initialzation #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

omgcheese
Copy link

Hey, Great library

I just noticed couple of things that can reduce boilerplate code using @JvmOverload annotation and init keyword. I also saw force unwrapping so I replaced that with safe unwrapping using let operator.

With kotlin annotation @jvmoverloads and init keyword, boilerplate
codebase can be reduced
@Zhuinden
Copy link

Don't use @JvmOverloads, it can have unintended side-effects.

However, you CAN use init { block to reduce duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants