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

💥 Signature changes of NotBlankString.Companion.create* functions #541

Closed
15 tasks done
Tracked by #587
LVMVRQUXL opened this issue Feb 29, 2024 · 0 comments · Fixed by #626
Closed
15 tasks done
Tracked by #587

💥 Signature changes of NotBlankString.Companion.create* functions #541

LVMVRQUXL opened this issue Feb 29, 2024 · 0 comments · Fixed by #626
Labels
common Item related to all platforms. feature New feature or request. good first issue Issues having enough details for new contributors to work on.
Milestone

Comments

@LVMVRQUXL
Copy link
Contributor

LVMVRQUXL commented Feb 29, 2024

📝 Description

While accepting a nullable object can be useful in some specific situations, it may be confusing for users.
Why creating an instance of NotBlankString from null in Kotlin code or in Java code? We don't know.

This is not because we can call the Any?.toString() function that we should do it!

So, we would like to change the type of the value argument from Any? to Any.

fun NotBlankString.Companion.create(value: Any): NotBlankString
fun NotBlankString.Companion.createOrNull(value: Any): NotBlankString?

🔗 Dependencies

This issue is blocked by the following ones:

✅ Checklist

For contributors

  • Follow the Issue implementation section in the contributing guidelines until the Checking the API binaries section.
  • Update the signature of the NotBlankString.Companion.create function.
  • Update the Kotlin tests of the NotBlankString.Companion.create function. See the Running tests section in the contributing guidelines for more details on how to run them, at least on the Kotlin/JVM platform.
  • Update the public API binaries. See the Checking the API binaries section in the contributing guidelines for more details about it.
  • Commit your local changes with the following message:
💥 Change signature of NotBlankString.Companion.create (#541)

Before: 'create(Any?): NotBlankString'.
After: 'create(Any): NotBlankString'.
  • Update the signature of the NotBlankString.Companion.createOrNull function.
  • Update the Kotlin tests of the NotBlankString.Companion.createOrNull function. See the Running tests section in the contributing guidelines for more details on how to run them, at least on the Kotlin/JVM platform.
  • Update the public API binaries. See the Checking the API binaries section in the contributing guidelines for more details about it.
  • Commit your local changes with the following message:
💥 Change signature of NotBlankString.Companion.createOrNull (#541)

Before: 'createOrNull(Any?): NotBlankString'.
After: 'createOrNull(Any): NotBlankString'.

For maintainers

  • Add an entry in the Unreleased section of the changelog.
  • Review the pull request.
  • Merge the pull request.
  • Update tracking issues if present.
@LVMVRQUXL LVMVRQUXL added feature New feature or request. common Item related to all platforms. labels Feb 29, 2024
@LVMVRQUXL LVMVRQUXL added this to the 4.5.0 ✨ milestone Feb 29, 2024
@LVMVRQUXL LVMVRQUXL added the good first issue Issues having enough details for new contributors to work on. label Feb 29, 2024
@LVMVRQUXL LVMVRQUXL removed this from the 4.5.0 milestone Mar 7, 2024
@LVMVRQUXL LVMVRQUXL added this to the 4.6.0 milestone Mar 16, 2024
@LVMVRQUXL LVMVRQUXL closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
@LVMVRQUXL LVMVRQUXL removed this from the 4.6.0 milestone Mar 19, 2024
@LVMVRQUXL LVMVRQUXL reopened this Mar 21, 2024
@LVMVRQUXL LVMVRQUXL modified the milestone: 4.6.0 Mar 21, 2024
augustomtt added a commit to augustomtt/types that referenced this issue Mar 27, 2024
Before: 'create(Any?): NotBlankString'.
After: 'create(Any): NotBlankString'.
augustomtt added a commit to augustomtt/types that referenced this issue Mar 27, 2024
)

Before: 'createOrNull(Any?): NotBlankString'.
After: 'createOrNull(Any): NotBlankString'.
@LVMVRQUXL LVMVRQUXL added this to the 4.6.0 milestone Mar 27, 2024
LVMVRQUXL pushed a commit to augustomtt/types that referenced this issue Mar 27, 2024
Before: 'create(Any?): NotBlankString'.
After: 'create(Any): NotBlankString'.
LVMVRQUXL pushed a commit to augustomtt/types that referenced this issue Mar 27, 2024
)

Before: 'createOrNull(Any?): NotBlankString'.
After: 'createOrNull(Any): NotBlankString'.
augustomtt added a commit to augustomtt/types that referenced this issue Mar 27, 2024
Before: 'create(Any?): NotBlankString'.
After: 'create(Any): NotBlankString'.
augustomtt added a commit to augustomtt/types that referenced this issue Mar 27, 2024
)

Before: 'createOrNull(Any?): NotBlankString'.
After: 'createOrNull(Any): NotBlankString'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Item related to all platforms. feature New feature or request. good first issue Issues having enough details for new contributors to work on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant