Skip to content

Conversation

AndrewKis
Copy link
Contributor

@AndrewKis AndrewKis commented May 6, 2025

Closes #1169

?.toKotlinLocalDateTime()

private fun String.toUrlOrNull(): URL? = if (isUrl(this)) catchSilent { URL(this) } else null
private fun String.toUrlOrNull(): URL? = if (isUrl(this)) catchSilent { URI(this).toURL() } else null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toUrl?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's Java API

public fun asUrl(fileOrUrl: String): URL =
if (isUrl(fileOrUrl)) {
URL(fileOrUrl).toURI()
URI(fileOrUrl)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uri?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's Java API

Copy link
Collaborator

@Jolanrensen Jolanrensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you do a Ctrl+f across the /dev example notebooks? Just to be sure we don't also use this function there :)

*
* {@include [Indent]}
* `| `__`.`__[**`toURL`**][Convert.toURL]`()`
* `| `__`.`__[**`toURL`**][Convert.toUrl]`()`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you missed the first part of the reference


// region toURL

@Deprecated(CONVERT_TO_URL, ReplaceWith(CONVERT_TO_URL_REPLACE))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might go to level = DeprecationLevel.ERROR directly, since we're breaking more stuff anyway

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot, thank you

@AndreiKingsley AndreiKingsley merged commit c0c7b7f into master May 6, 2025
3 checks passed
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.

Rename ..URL in API to ..Url and replace URL() deprecated constructor
4 participants