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

Make getCharacterEncoding in UrlModuleSourceProvider protected #1233

Merged
merged 3 commits into from
Jul 30, 2022

Conversation

midgleyc
Copy link
Contributor

Allows subclasses to override the encoding used in case a local
javascript file is interpreted as being latin-1, when it should be
whatever the file is encoded with. Before openJDK 17.0.3 this was
automatically interpreted as utf-8.

Allows #1232 to be worked around by code calling Rhino.

Allows subclasses to override the encoding used in case a local
javascript file is interpreted as being latin-1, when it should be
whatever the file is encoded with. Before openJDK 17.0.3 this was
automatically interpreted as utf-8.
@gbrail
Copy link
Collaborator

gbrail commented Jul 16, 2022

Sorry we are so behind on these -- thanks for fixing this and it looks straighforward.

Could you please add a test case to ensure that future changes don't break this?

@midgleyc
Copy link
Contributor Author

midgleyc commented Jul 16, 2022

I could add a test, but I've only changed an access modifier. Do you want a test that uses reflection to confirm the access modifier is protected or public? A test that creates a subclass and confirms that the method can be overridden?

I've added one using reflection. Let me know if you want something different.

@gbrail
Copy link
Collaborator

gbrail commented Jul 30, 2022

I think that test is fine. Thanks!

@gbrail gbrail merged commit e360e55 into mozilla:master Jul 30, 2022
@midgleyc midgleyc deleted the protected-encoding branch July 30, 2022 07:28
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.

2 participants