Skip to content

[ji] java_import now raise NameError on invalid names#6182

Merged
kares merged 4 commits intojruby:masterfrom
kares:java-import
Apr 20, 2020
Merged

[ji] java_import now raise NameError on invalid names#6182
kares merged 4 commits intojruby:masterfrom
kares:java-import

Conversation

@kares
Copy link
Member

@kares kares commented Apr 18, 2020

given invalid import names java_import will raise NameError,

removing constant =~ /^[A-Z].*/ capitalization validation, leaving that part to const_set
the [A-Z] validation did not handle multi-byte capital (UTF-8) characters that well ...
in theory Java class names support the full Unicode set not just ascii characters.

@kares kares added this to the JRuby 9.3.0.0 milestone Apr 18, 2020
@kares kares marked this pull request as ready for review April 18, 2020 18:44
@enebo
Copy link
Member

enebo commented Apr 20, 2020

Looks like some nice error messages to me

Copy link
Member

@headius headius left a comment

Choose a reason for hiding this comment

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

Looks good!

@kares kares merged commit d5e8658 into jruby:master Apr 20, 2020
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.

3 participants