Skip to content

rename to valid camel case and remove deprecated URL()#1175

Merged
AndreiKingsley merged 2 commits into
masterfrom
api_renaimings
May 6, 2025
Merged

rename to valid camel case and remove deprecated URL()#1175
AndreiKingsley merged 2 commits into
masterfrom
api_renaimings

Conversation

@AndrewKis

@AndrewKis AndrewKis commented May 6, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

toUrl?

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Uri?

Copy link
Copy Markdown
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

@Jolanrensen Jolanrensen left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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