Skip to content

Provide better error message when using :: in java_import (fixes #2074)#2075

Merged
headius merged 1 commit intojruby:masterfrom
byteit101:master
Nov 4, 2014
Merged

Provide better error message when using :: in java_import (fixes #2074)#2075
headius merged 1 commit intojruby:masterfrom
byteit101:master

Conversation

@byteit101
Copy link
Member

raise an error with the wrong type of strings, as per irc:

I think it should be documented as saying this is Java calling format but we can probably look for ‘::’ in code and generate a better error message since I don’t think that is allowable in classname

@byteit101 byteit101 force-pushed the master branch 2 times, most recently from 3b2a792 to c79a062 Compare October 28, 2014 00:26
@headius
Copy link
Member

headius commented Nov 2, 2014

Did you see the failures? I think your patch is rejecting too much.

@byteit101
Copy link
Member Author

Interesting. org.jruby.exceptions.RaiseException: (ArgumentError) not a valid Java identifier: java.io.File manually trying java.io.File on this works for me. I'm confused. Also I have no idea what the org.apache.bsf.BSFException: Exception is.

@headius
Copy link
Member

headius commented Nov 2, 2014

The BSFException probably just wraps the same kind of exception as the ArgumentError.

@headius
Copy link
Member

headius commented Nov 2, 2014

Hmm yeah, I'm confused as well.

headius added a commit that referenced this pull request Nov 2, 2014
@headius
Copy link
Member

headius commented Nov 2, 2014

Incorporated the other :: version manually so we at least error for that. If we can figure out this more comprehensive version, that would still be best.

@headius headius added this to the JRuby 1.7.17 milestone Nov 2, 2014
@headius headius self-assigned this Nov 2, 2014
headius added a commit that referenced this pull request Nov 4, 2014
Provide better error message when using :: in java_import (fixes #2074)
@headius headius merged commit 1df19df into jruby:master Nov 4, 2014
yousuketto pushed a commit to yousuketto/jruby that referenced this pull request Nov 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants